Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 9 from a total of 9 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Start Game | 18474921 | 339 days ago | IN | 0 ETH | 0.00066904 | ||||
Claim Winner | 18471599 | 339 days ago | IN | 0 ETH | 0.00955211 | ||||
Start Game | 18471361 | 339 days ago | IN | 0 ETH | 0.00139724 | ||||
Start Game | 18470393 | 340 days ago | IN | 0 ETH | 0.00140248 | ||||
Claim Winner | 18468072 | 340 days ago | IN | 0 ETH | 0.00606363 | ||||
Start Game | 18467963 | 340 days ago | IN | 0 ETH | 0.000979 | ||||
Set Passcode | 18467961 | 340 days ago | IN | 0 ETH | 0.00094322 | ||||
Start Game | 18467845 | 340 days ago | IN | 0 ETH | 0.0007459 | ||||
0x60806040 | 18467557 | 340 days ago | IN | 0 ETH | 0.06555486 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
GameFactory
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./Roller.sol"; import "./ENSReverseRegistration.sol"; interface BingoCardsNFT { function boardArray(uint tokenId) external view returns (uint8[5][5] memory); function boardString(uint tokenId) external view returns (string memory); function ownerOf(uint256 tokenId) external view returns (address); } contract GameFactory is ERC1155Receiver, IERC721Receiver, Ownable, Pausable, ReentrancyGuard { using Counters for Counters.Counter; enum TokenType { NONE, ERC721, ERC1155 } struct Game { address owner; address tokenAddress; uint256 tokenId; uint256 startingBlock; TokenType tokenType; } mapping(address => mapping(uint => uint)) gameIndexByOwnerAndId; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); Roller public roller; uint public defaultBlockPeriod = 3; uint public constant MAX_BLOCK_PERIOD = 24; BingoCardsNFT public bingoCardsNFT; mapping(uint => Game) public games; mapping (address => uint[]) public gameIdsByOwner; mapping(uint => address) public winners; Counters.Counter private gameCounter; mapping(uint => uint) private blockPeriods; mapping(uint => bytes32) public passcodes; event GameCreated(uint indexed gameId, address indexed owner, address indexed tokenAddress, uint256 tokenId); event GameDeleted(uint indexed gameId, address indexed owner, address caller); event Deposited(address indexed user, address indexed tokenContract, uint256 tokenId); event Withdrawn(address indexed user, address indexed tokenContract, uint256 tokenId); event BINGO(uint indexed gameId, uint tokenId, address indexed winner); constructor() { roller = Roller(0xDc582388f58CB90F9044CB866166B9921d7cF64D); // mainnet roller bingoCardsNFT = BingoCardsNFT(0xA99cAb29165914300C9Ec34c87a33E89C9f38769); // mainnet NFTs } // NFT Transfer function newGameERC721(address tokenAddress, uint256 tokenId, uint rollFreq) external { require(IERC721(tokenAddress).ownerOf(tokenId) == msg.sender, "Not the owner."); require(rollFreq <= MAX_BLOCK_PERIOD, "Invalid block period"); IERC721(tokenAddress).transferFrom(msg.sender, address(this), tokenId); if (rollFreq > 0 && rollFreq != defaultBlockPeriod) { blockPeriods[gameCounter.current()] = rollFreq; } _newGame(msg.sender, tokenAddress, tokenId, TokenType.ERC721); } function newGameERC1155(address tokenAddress, uint256 tokenId, uint rollFreq) external { require(IERC1155(tokenAddress).balanceOf(msg.sender, tokenId) > 0, "Not the owner."); require(rollFreq <= MAX_BLOCK_PERIOD, "Invalid block period"); IERC1155(tokenAddress).safeTransferFrom(msg.sender, address(this), tokenId, 1, ""); if (rollFreq > 0 && rollFreq != defaultBlockPeriod) { blockPeriods[gameCounter.current()] = rollFreq; } _newGame(msg.sender, tokenAddress, tokenId, TokenType.ERC1155); } function onERC721Received(address, address from, uint256 tokenId, bytes calldata) external override returns (bytes4) { require(msg.sender == address(IERC721(msg.sender)), "Only genuine ERC721 transfers allowed."); _newGame(from, msg.sender, tokenId, TokenType.ERC721); return this.onERC721Received.selector; } function onERC1155Received(address, address from, uint256 id, uint256 value, bytes calldata) external override returns(bytes4) { require(value == 1, "Can only deposit 1 token at a time."); require(msg.sender == address(IERC1155(msg.sender)), "Only genuine ERC1155 transfers allowed."); _newGame(from, msg.sender, id, TokenType.ERC1155); return this.onERC1155Received.selector; } function onERC1155BatchReceived(address, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata) external override returns(bytes4) { require(msg.sender == address(IERC1155(msg.sender)), "Only genuine ERC1155 batch transfers allowed."); for (uint256 i = 0; i < ids.length; i++) { _newGame(from, msg.sender, ids[i], TokenType.ERC1155); } return this.onERC1155BatchReceived.selector; } function withdraw(uint gameId) external nonReentrant { require(games[gameId].owner == msg.sender, "Not the owner."); Game storage _game = games[gameId]; if (_game.tokenType == TokenType.ERC1155) { IERC1155(_game.tokenAddress).safeTransferFrom(address(this), msg.sender, _game.tokenId, 1, ""); } else if (_game.tokenType == TokenType.ERC721) { IERC721(_game.tokenAddress).transferFrom(address(this), msg.sender, _game.tokenId); } emit Withdrawn(msg.sender, _game.tokenAddress, _game.tokenId); deleteGame(gameId); } // Game Management function _newGame(address gameOwner, address tokenAddress, uint256 tokenId, TokenType tokenType) private whenNotPaused returns (uint) { uint currentGameId = gameCounter.current(); games[currentGameId] = Game(gameOwner, tokenAddress, tokenId, 0, tokenType); uint[] storage ownerGames = gameIdsByOwner[gameOwner]; uint indexInOwnerList = ownerGames.length; ownerGames.push(currentGameId); gameIndexByOwnerAndId[gameOwner][currentGameId] = indexInOwnerList; gameCounter.increment(); emit GameCreated(currentGameId, gameOwner, tokenAddress, tokenId); return currentGameId; } function deleteGame(uint _gameId) private { require(_gameId < gameCounter.current(), "Invalid game ID"); address _owner = games[_gameId].owner; uint[] storage ownerGameIds = gameIdsByOwner[_owner]; uint indexToDelete = gameIndexByOwnerAndId[_owner][_gameId]; require(ownerGameIds[indexToDelete] == _gameId, "Data inconsistency!"); ownerGameIds[indexToDelete] = ownerGameIds[ownerGameIds.length - 1]; gameIndexByOwnerAndId[_owner][ownerGameIds[indexToDelete]] = indexToDelete; ownerGameIds.pop(); emit GameDeleted(_gameId, _owner, msg.sender); delete gameIndexByOwnerAndId[_owner][_gameId]; // Clean up } function startGame(uint _gameId) public whenNotPaused { require(_gameId < gameCounter.current(), "Invalid game ID"); require(games[_gameId].owner == msg.sender, "Only owner can start game"); require(games[_gameId].startingBlock == 0 || !isActive(_gameId), "Game in progress"); games[_gameId].startingBlock = block.number; } function listGames(address _owner) external view returns (uint[] memory) { return gameIdsByOwner[_owner]; } function gameCount() public view returns (uint) { return gameCounter.current(); } function gameCountByOwner(address _owner) public view returns (uint) { return gameIdsByOwner[_owner].length; } function setBlockFreq(uint _gameId, uint _numBlocks) public { require(_gameId < gameCounter.current(), "Invalid game ID"); require(games[_gameId].owner == msg.sender, "Only owner can set block freq"); require(games[_gameId].startingBlock == 0, "Game already started"); blockPeriods[_gameId] = _numBlocks; } function getBlockPeriod(uint _gameId) public view returns (uint) { require(_gameId < gameCounter.current(), "Invalid game ID"); return blockPeriods[_gameId] == 0 ? defaultBlockPeriod : blockPeriods[_gameId]; } // Passcodes function setPasscode(uint _gameId, bytes32 _passcode) public { require(_gameId < gameCounter.current(), "Invalid game ID"); require(games[_gameId].owner == msg.sender, "Only owner can set passcode"); passcodes[_gameId] = _passcode; } function checkPasscode(uint _gameId, string memory _passcode) public view returns (bool) { require(_gameId < gameCounter.current(), "Invalid game ID"); return passcodes[_gameId] == keccak256(abi.encodePacked(_passcode)); } // Rolled Numbers function rollCounts(uint _gameId) public view returns (uint, uint) { require(games[_gameId].startingBlock > 0, "Game not started"); require(_gameId < gameCounter.current(), "Invalid game ID"); return rollCountsInternal(_gameId); } function rollCountsInternal(uint _gameId) internal view returns (uint, uint) { uint _blockPeriod = blockPeriods[_gameId] > 0 ? blockPeriods[_gameId] : defaultBlockPeriod; return roller.count(games[_gameId].startingBlock, _blockPeriod); } function isActive(uint _gameId) public view returns (bool) { (uint _rolls, uint _total) = rollCountsInternal(_gameId); return (_rolls <= _total); } function getBlockNumbers(uint _gameId) public view returns (uint[] memory) { require(_gameId < gameCounter.current(), "Invalid game ID"); require(games[_gameId].startingBlock > 0, "Game not started"); uint _blockPeriod = blockPeriods[_gameId] > 0 ? blockPeriods[_gameId] : defaultBlockPeriod; return roller.getBlockNumbers(games[_gameId].startingBlock, _blockPeriod); } function getRolls(uint _gameId) public view returns (uint[] memory) { require(_gameId < gameCounter.current(), "Invalid game ID"); require(games[_gameId].startingBlock > 0, "Game not started"); uint _blockPeriod = blockPeriods[_gameId] > 0 ? blockPeriods[_gameId] : defaultBlockPeriod; return roller.getRolls(games[_gameId].startingBlock, _blockPeriod, makeSeed(_gameId)); } function currentBlockNumber() public view returns (uint) { return block.number; } function makeSeed(uint _gameId) internal view returns (bytes32) { return keccak256(abi.encodePacked(_gameId, games[_gameId].owner, games[_gameId].startingBlock)); } // Bingo Cards function boardNumbersArray(uint tokenId) external view returns (uint8[5][5] memory){ return bingoCardsNFT.boardArray(tokenId); } function boardNumbersString(uint tokenId) external view returns (string memory){ return bingoCardsNFT.boardString(tokenId); } function fiveFromBoard(uint tokenId, uint orientation, uint index) public view returns (uint[5] memory) { require(index < 5, "Invalid index"); uint[5] memory result; uint8[5][5] memory board = bingoCardsNFT.boardArray(tokenId); if (orientation == 0) { // HORIZONTAL result[0] = board[index][0]; result[1] = board[index][1]; result[2] = board[index][2]; result[3] = board[index][3]; result[4] = board[index][4]; return result; } else if (orientation == 1) { // VERTICAL result[0] = board[0][index]; result[1] = board[1][index]; result[2] = board[2][index]; result[3] = board[3][index]; result[4] = board[4][index]; return result; } else if (orientation == 2) { // DIAGONAL UP result[0] = board[4][0]; result[1] = board[3][1]; result[2] = 0; result[3] = board[1][3]; result[4] = board[0][4]; return result; } else if (orientation == 3) { // REVERSE DOWN result[0] = board[0][0]; result[1] = board[1][1]; result[2] = 0; result[3] = board[3][3]; result[4] = board[4][4]; return result; } else if (orientation == 4) { // FOUR CORNERS result[0] = board[0][0]; result[1] = board[0][4]; result[2] = 0; result[3] = board[4][0]; result[4] = board[4][4]; return result; } else revert("Invalid orientation"); } function fiveRolls(uint gameId, uint[5] memory indexes) public view returns (uint[5] memory) { require(isActive(gameId), "Game is not active"); uint[5] memory result; uint[] memory rolls = getRolls(gameId); result[0] = rolls[indexes[0]]; result[1] = rolls[indexes[1]]; result[2] = rolls[indexes[2]]; result[3] = rolls[indexes[3]]; result[4] = rolls[indexes[4]]; return result; } function fiveRollsCheap(uint gameId, uint[5] memory indexes) public view returns (uint[5] memory){ require(isActive(gameId), "Game is not active"); require(gameId < gameCounter.current(), "Invalid game ID"); require(games[gameId].startingBlock > 0, "Game not started"); uint _blockPeriod = blockPeriods[gameId] > 0 ? blockPeriods[gameId] : defaultBlockPeriod; return roller.fiveRollsByIndex(indexes, games[gameId].startingBlock, _blockPeriod, makeSeed(gameId)); } // PARAMS: // ---------------------------- // gameId game ID // tokenId gameBoard NFT // orientation 0=horizontal, 1=vertical, 2=diagonal up, 3=diagonal down, 4=four corners // index 0-4 to specify position of the 5 numbers on the game board // indexes 5 indexes of the rolls to check function claimWinner(uint gameId, uint tokenId, uint orientation, uint index, uint[5] memory indexes, string memory _passcode) public whenNotPaused { require(passcodes[gameId] == 0 || checkPasscode(gameId, _passcode), "Invalid passcode"); require(isActive(gameId), "Game is not active"); uint[5] memory fromBoard = fiveFromBoard(tokenId, orientation, index); uint[5] memory rolls = fiveRolls(gameId, indexes); require(winners[gameId] == address(0), "Game already won"); require(fromBoard[0] == rolls[0], "Roll 0 doesn't match"); require(fromBoard[1] == rolls[1], "Roll 1 doesn't match"); require(fromBoard[2] == rolls[2] || fromBoard[2] == 0, "Roll 2 doesn't match"); // Center can be 0 require(fromBoard[3] == rolls[3], "Roll 3 doesn't match"); require(fromBoard[4] == rolls[4], "Roll 4 doesn't match"); address _owner = bingoCardsNFT.ownerOf(tokenId); winners[gameId] = _owner; // Send NFT to winner Game storage _game = games[gameId]; if (_game.tokenType == TokenType.ERC1155) { IERC1155(_game.tokenAddress).safeTransferFrom(address(this), _owner, _game.tokenId, 1, ""); } else if (_game.tokenType == TokenType.ERC721) { IERC721(_game.tokenAddress).transferFrom(address(this), _owner, _game.tokenId); } emit Withdrawn(_owner, _game.tokenAddress, _game.tokenId); emit BINGO(gameId, tokenId, _owner); deleteGame(gameId); // delete from users list of games } function checkWinner(uint gameId, uint tokenId, uint orientation, uint index, uint[5] memory indexes) public view returns (bool) { require(isActive(gameId), "Game is not active"); uint[5] memory fromBoard = fiveFromBoard(tokenId, orientation, index); uint[5] memory rolls = fiveRolls(gameId, indexes); require(winners[gameId] == address(0), "Game already won"); require(fromBoard[0] == rolls[0], "Roll 0 doesn't match"); require(fromBoard[1] == rolls[1], "Roll 1 doesn't match"); require(fromBoard[2] == rolls[2] || fromBoard[2] == 0, "Roll 2 doesn't match"); // Center can be 0 require(fromBoard[3] == rolls[3], "Roll 3 doesn't match"); require(fromBoard[4] == rolls[4], "Roll 4 doesn't match"); return true; } // Contract Admin function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } function setRoller(address _roller) public onlyOwner { require(address(roller) == address(0), "Roller already set"); roller = Roller(_roller); } function setDefaultBlockPeriod(uint _blockPeriod) public onlyOwner { defaultBlockPeriod = _blockPeriod; } function setBingoCardAddr(address _bingoCardsNFT) public onlyOwner { bingoCardsNFT = BingoCardsNFT(_bingoCardsNFT); } function setName(address ensRegistry, string calldata ensName) external onlyOwner { ENSReverseRegistration.setName(ensRegistry, ensName); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @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; 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 require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol) pragma solidity ^0.8.0; import "../IERC1155Receiver.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev _Available since v3.1._ */ abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IENS { event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner); event Transfer(bytes32 indexed node, address owner); event NewResolver(bytes32 indexed node, address resolver); event NewTTL(bytes32 indexed node, uint64 ttl); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function setRecord(bytes32, address, address, uint64) external; function setSubnodeRecord(bytes32, bytes32, address, address, uint64) external; function setSubnodeOwner(bytes32, bytes32, address) external returns(bytes32); function setResolver(bytes32, address) external; function setOwner(bytes32, address) external; function setTTL(bytes32, uint64) external; function setApprovalForAll(address, bool) external; function owner(bytes32) external view returns (address); function resolver(bytes32) external view returns (address); function ttl(bytes32) external view returns (uint64); function recordExists(bytes32) external view returns (bool); function isApprovedForAll(address, address) external view returns (bool); } interface IReverseRegistrar { function ADDR_REVERSE_NODE() external view returns (bytes32); function ens() external view returns (IENS); function defaultResolver() external view returns (address); function claim(address) external returns (bytes32); function claimWithResolver(address, address) external returns (bytes32); function setName(string calldata) external returns (bytes32); function node(address) external pure returns (bytes32); } library ENSReverseRegistration { // namehash('addr.reverse') bytes32 internal constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2; function setName(address ensregistry, string calldata ensname) internal { IReverseRegistrar(IENS(ensregistry).owner(ADDR_REVERSE_NODE)).setName(ensname); } }
pragma solidity ^0.8.0; /* * ____ * /\' .\ _____ * /: \___\ / . /\ * \' / . / /____/..\ * \/___/ \' '\ / * \'__'\/ */ contract Roller { uint public constant MAX_VALUE = 75; uint public constant MAX_BLOCKS = 256; constructor() { } function count(uint startBlock, uint freq) public view returns (uint, uint) { require(startBlock <= block.number, "Start block must be less than or equal to the current block"); require(freq > 0, "Frequency must be greater than 0"); return (((block.number - startBlock) + freq - 1) / freq, MAX_BLOCKS / freq); } function getBlockNumbers(uint startBlock, uint freq) public view returns (uint[] memory) { require(startBlock <= block.number, "Start block must be less than or equal to the current block"); require(startBlock > block.number - MAX_BLOCKS, "Block hash is not stored"); require(freq > 0, "Frequency must be greater than 0"); (uint arraySize,) = count(startBlock, freq); uint[] memory blocks = new uint[](arraySize); for(uint i = 0; i < arraySize; i++) { if (startBlock + freq * i >= block.number) break; else blocks[i] = startBlock + freq * i; } return blocks; } function getRolls(uint startBlock, uint freq, bytes32 seed) public view returns (uint[] memory) { require(startBlock <= block.number, "Start block must be less than or equal to the current block"); require(startBlock > block.number - MAX_BLOCKS, "Block hash is not stored"); require(freq > 0, "Frequency must be greater than 0"); (uint arraySize,) = count(startBlock, freq); uint[] memory blocks = new uint[](arraySize); for(uint i = 0; i < arraySize; i++) { if (startBlock + freq * i >= block.number) break; else blocks[i] = generateRandomNumber(startBlock + freq * i, seed); } return blocks; } function fiveRollsByIndex(uint[5] memory indexes, uint startBlock, uint freq, bytes32 seed) public view returns (uint[5] memory) { require(startBlock <= block.number, "Start block must be less than or equal to the current block"); require(startBlock > block.number - MAX_BLOCKS, "Block hash is not stored"); require(freq > 0, "Frequency must be greater than 0"); require(indexes.length == 5, "Array length must be 5"); uint[5] memory rolls; for(uint i = 0; i < 5; i++) { if (startBlock + freq * indexes[i] >= block.number) break; else rolls[i] = generateRandomNumber(startBlock + freq * indexes[i], seed); } return rolls; } // Check Numbers function isNumberInList(uint startBlock, uint freq, uint number) public view returns (bool) { require(startBlock <= block.number, "Start block must be less than or equal to the current block"); require(startBlock > block.number - MAX_BLOCKS, "Block hash is not stored"); if (freq == 0) freq++; if (number >= startBlock && number < block.number) { if ((number - startBlock) % freq == 0) { return true; } } return false; } function areNumbersInList(uint startBlock, uint freq, uint[] memory numbers) public view returns (bool) { require(numbers.length >= 1 && numbers.length <= 5, "Array length must be between 1 and 5"); for (uint i = 0; i < numbers.length; i++) { if (!isNumberInList(startBlock, freq, numbers[i])) { return false; } } return true; } // Misc function currentBlockNumber() public view returns (uint) { return block.number; } // Internal function generateRandomNumber(uint256 _blockNumber, bytes32 _seed) internal view returns (uint256) { require(block.number > _blockNumber, "Block not yet mined"); require(_blockNumber > block.number - MAX_BLOCKS, "Block hash is not stored"); return uint256(keccak256(abi.encodePacked(blockhash(_blockNumber), _seed))) % MAX_VALUE + 1; } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"winner","type":"address"}],"name":"BINGO","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"GameCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"GameDeleted","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"MAX_BLOCK_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bingoCardsNFT","outputs":[{"internalType":"contract BingoCardsNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"boardNumbersArray","outputs":[{"internalType":"uint8[5][5]","name":"","type":"uint8[5][5]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"boardNumbersString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"},{"internalType":"string","name":"_passcode","type":"string"}],"name":"checkPasscode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"orientation","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256[5]","name":"indexes","type":"uint256[5]"}],"name":"checkWinner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"orientation","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256[5]","name":"indexes","type":"uint256[5]"},{"internalType":"string","name":"_passcode","type":"string"}],"name":"claimWinner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultBlockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"orientation","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"fiveFromBoard","outputs":[{"internalType":"uint256[5]","name":"","type":"uint256[5]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint256[5]","name":"indexes","type":"uint256[5]"}],"name":"fiveRolls","outputs":[{"internalType":"uint256[5]","name":"","type":"uint256[5]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint256[5]","name":"indexes","type":"uint256[5]"}],"name":"fiveRollsCheap","outputs":[{"internalType":"uint256[5]","name":"","type":"uint256[5]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"gameCountByOwner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"gameIdsByOwner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"games","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"startingBlock","type":"uint256"},{"internalType":"enum GameFactory.TokenType","name":"tokenType","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"}],"name":"getBlockNumbers","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"}],"name":"getBlockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"}],"name":"getRolls","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"}],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"listGames","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"rollFreq","type":"uint256"}],"name":"newGameERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"rollFreq","type":"uint256"}],"name":"newGameERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"passcodes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"}],"name":"rollCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roller","outputs":[{"internalType":"contract Roller","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bingoCardsNFT","type":"address"}],"name":"setBingoCardAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"},{"internalType":"uint256","name":"_numBlocks","type":"uint256"}],"name":"setBlockFreq","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blockPeriod","type":"uint256"}],"name":"setDefaultBlockPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ensRegistry","type":"address"},{"internalType":"string","name":"ensName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"},{"internalType":"bytes32","name":"_passcode","type":"bytes32"}],"name":"setPasscode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_roller","type":"address"}],"name":"setRoller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"}],"name":"startGame","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"winners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600360045534801562000015575f80fd5b5062000021336200007f565b5f805460ff60a01b1916905560018055600380546001600160a01b031990811673dc582388f58cb90f9044cb866166b9921d7cf64d179091556005805490911673a99cab29165914300c9ec34c87a33e89c9f38769179055620000ce565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b613b2280620000dc5f395ff3fe608060405234801561000f575f80fd5b50600436106102f9575f3560e01c80636976f93e11610192578063a2f55860116100e8578063e193890b11610093578063eb0daffd1161006e578063eb0daffd14610700578063f23a6e6114610720578063f2fde38b14610733575f80fd5b8063e193890b146106ae578063e5ed1d59146106cd578063e8bf6379146106e0575f80fd5b8063b7970ff7116100c3578063b7970ff714610661578063bc197c8114610674578063d539139314610687575f80fd5b8063a2f5586014610613578063a2fb117514610626578063b7783df01461064e575f80fd5b80637e40bcc0116101485780638b173d55116101235780638b173d55146105d25780638da5cb5b146105db57806398cef882146105eb575f80fd5b80637e40bcc0146105a457806382afd23b146105b75780638456cb59146105ca575f80fd5b80636f29162c116101785780636f29162c14610576578063700cf95614610589578063715018a61461059c575f80fd5b80636976f93e146105505780636ce9f31d14610563575f80fd5b80633447470d116102525780634d1975b4116101fd57806359769b15116101d857806359769b15146105195780635c975abb1461052c57806365df8a9d1461053d575f80fd5b80634d1975b4146104eb57806353a6d0bf146104f357806357251fd614610506575f80fd5b80633f4ba83a1161022d5780633f4ba83a146104bd578063442ba89f146104c557806348e79223146104d8575f80fd5b80633447470d1461049c578063378ec23b146104a45780633b4b145a146104aa575f80fd5b8063150b7a02116102b25780632e1a7d4d1161028d5780632e1a7d4d146104635780632f09177d146104765780633121db1c14610489575f80fd5b8063150b7a02146103ec5780632931ccca146104185780632e0683651461044e575f80fd5b80630f192442116102e25780630f19244214610350578063116213ed14610370578063117a5b9014610390575f80fd5b806301ffc9a7146102fd5780630a097c0f14610325575b5f80fd5b61031061030b366004613037565b610746565b60405190151581526020015b60405180910390f35b600554610338906001600160a01b031681565b6040516001600160a01b03909116815260200161031c565b61036361035e36600461305e565b6107ae565b60405161031c9190613075565b61038361037e366004613173565b610925565b60405161031c91906131c0565b6103db61039e36600461305e565b60066020525f9081526040902080546001820154600283015460038401546004909401546001600160a01b03938416949390921692909160ff1685565b60405161031c9594939291906131e2565b6103ff6103fa36600461328d565b610b0b565b6040516001600160e01b0319909116815260200161031c565b6104406104263660046132fb565b6001600160a01b03165f9081526007602052604090205490565b60405190815260200161031c565b61046161045c36600461305e565b610b45565b005b61046161047136600461305e565b610b52565b600354610338906001600160a01b031681565b610461610497366004613316565b610d52565b610440601881565b43610440565b6104406104b836600461305e565b610d6a565b610461610de2565b6103636104d33660046132fb565b610df4565b6103836104e6366004613173565b610e5d565b610440610fe3565b610461610501366004613367565b610ff2565b610383610514366004613387565b611109565b610310610527366004613429565b61144d565b5f54600160a01b900460ff16610310565b61044061054b36600461346d565b6114d5565b61046161055e366004613497565b611500565b610310610571366004613508565b611a71565b6104616105843660046132fb565b611d04565b610461610597366004613367565b611d2e565b610461611de7565b6104616105b236600461354f565b611df8565b6103106105c536600461305e565b611fc9565b610461611fdf565b61044060045481565b5f546001600160a01b0316610338565b6105fe6105f936600461305e565b611fef565b6040805192835260208301919091520161031c565b6104616106213660046132fb565b612096565b61033861063436600461305e565b60086020525f90815260409020546001600160a01b031681565b61036361065c36600461305e565b612119565b61046161066f36600461354f565b612290565b6103ff6106823660046135c2565b612433565b6104407f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6104406106bc36600461305e565b600b6020525f908152604090205481565b6104616106db36600461305e565b6124a5565b6106f36106ee36600461305e565b6125da565b60405161031c919061369b565b61071361070e36600461305e565b612661565b60405161031c91906136cd565b6103ff61072e366004613730565b6126d5565b6104616107413660046132fb565b612786565b5f6001600160e01b031982167f4e2312e00000000000000000000000000000000000000000000000000000000014806107a857507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60606107b960095490565b82106107fe5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064015b60405180910390fd5b5f8281526006602052604090206003015461084e5760405162461bcd60e51b815260206004820152601060248201526f11d85b59481b9bdd081cdd185c9d195960821b60448201526064016107f5565b5f828152600a602052604081205461086857600454610877565b5f838152600a60205260409020545b600380545f86815260066020526040908190209092015491517fc451dd590000000000000000000000000000000000000000000000000000000081529293506001600160a01b03169163c451dd59916108dd918590600401918252602082015260400190565b5f60405180830381865afa1580156108f7573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261091e91908101906137a7565b9392505050565b61092d612fec565b61093683611fc9565b6109775760405162461bcd60e51b815260206004820152601260248201527147616d65206973206e6f742061637469766560701b60448201526064016107f5565b60095483106109ba5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f83815260066020526040902060030154610a0a5760405162461bcd60e51b815260206004820152601060248201526f11d85b59481b9bdd081cdd185c9d195960821b60448201526064016107f5565b5f838152600a6020526040812054610a2457600454610a33565b5f848152600a60205260409020545b600380545f8781526006602090815260409182902093840154935482518083018b905260609190911b6bffffffffffffffffffffffff191681840152605480820186905283518083039091018152607490910190925281519101209293506001600160a01b0316916335f4da7091869185906040518563ffffffff1660e01b8152600401610ac49493929190613848565b60a060405180830381865afa158015610adf573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b039190613872565b949350505050565b5f610b198533866001612813565b507f150b7a02000000000000000000000000000000000000000000000000000000009695505050505050565b610b4d6129a7565b600455565b610b5a612a00565b5f818152600660205260409020546001600160a01b03163314610bb05760405162461bcd60e51b815260206004820152600e60248201526d2737ba103a34329037bbb732b91760911b60448201526064016107f5565b5f8181526006602052604090206002600482015460ff166002811115610bd857610bd86131ce565b03610c63576001818101546002830154604051637921219560e11b81523060048201523360248201526044810191909152606481019290925260a060848301525f60a48301526001600160a01b03169063f242432a9060c4015f604051808303815f87803b158015610c48575f80fd5b505af1158015610c5a573d5f803e3d5ffd5b50505050610cf1565b6001600482015460ff166002811115610c7e57610c7e6131ce565b03610cf157600181015460028201546040516323b872dd60e01b815230600482015233602482015260448101919091526001600160a01b03909116906323b872dd906064015f604051808303815f87803b158015610cda575f80fd5b505af1158015610cec573d5f803e3d5ffd5b505050505b600181015460028201546040519081526001600160a01b039091169033907fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb9060200160405180910390a3610d4582612a59565b50610d4f60018055565b50565b610d5a6129a7565b610d65838383612c6f565b505050565b5f610d7460095490565b8210610db45760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f828152600a602052604090205415610dda575f828152600a60205260409020546107a8565b505060045490565b610dea6129a7565b610df2612d7b565b565b6001600160a01b0381165f90815260076020908152604091829020805483518184028101840190945280845260609392830182828015610e5157602002820191905f5260205f20905b815481526020019060010190808311610e3d575b50505050509050919050565b610e65612fec565b610e6e83611fc9565b610eaf5760405162461bcd60e51b815260206004820152601260248201527147616d65206973206e6f742061637469766560701b60448201526064016107f5565b610eb7612fec565b5f610ec185612119565b8451815191925082918110610ed857610ed86138c3565b6020026020010151825f60058110610ef257610ef26138c3565b602002015280846001602002015181518110610f1057610f106138c3565b602002602001015182600160058110610f2b57610f2b6138c3565b602002015280846002602002015181518110610f4957610f496138c3565b602002602001015182600260058110610f6457610f646138c3565b602002015280846003602002015181518110610f8257610f826138c3565b602002602001015182600360058110610f9d57610f9d6138c3565b602002015280846004602002015181518110610fbb57610fbb6138c3565b602002602001015182600460058110610fd657610fd66138c3565b6020020152509392505050565b5f610fed60095490565b905090565b60095482106110355760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f828152600660205260409020546001600160a01b0316331461109a5760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c79206f776e65722063616e2073657420626c6f636b206672657100000060448201526064016107f5565b5f82815260066020526040902060030154156110f85760405162461bcd60e51b815260206004820152601460248201527f47616d6520616c7265616479207374617274656400000000000000000000000060448201526064016107f5565b5f918252600a602052604090912055565b611111612fec565b600582106111615760405162461bcd60e51b815260206004820152600d60248201527f496e76616c696420696e6465780000000000000000000000000000000000000060448201526064016107f5565b611169612fec565b6005546040516387f6368d60e01b8152600481018790525f916001600160a01b0316906387f6368d9060240161032060405180830381865afa1580156111b1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111d591906138d7565b9050845f0361129b578084600581106111f0576111f06138c3565b60200201515160ff16825280846005811061120d5761120d6138c3565b60200201516001602002015160ff168260016020020152808460058110611236576112366138c3565b602002015160409081015160ff169083015280846005811061125a5761125a6138c3565b602002015160609081015160ff169083015280846005811061127e5761127e6138c3565b602002015160045b602002015160ff16608083015250905061091e565b8460010361134857805184600581106112b6576112b66138c3565b6020908102919091015160ff16835281015184600581106112d9576112d96138c3565b602002015160ff16826001602002015280600260200201518460058110611302576113026138c3565b602002015160ff16604083015260608101518460058110611325576113256138c3565b602002015160ff16606083015260808101518460058110611286576112866138c3565b8460020361138c5760808101515160ff90811683526060808301516020908101518316858201525f604086018190529084015182015190921690840152819061127e565b846003036113d15780515160ff9081168352602080830151810151909116908301525f6040830152606081015160035b602002015160ff16606083015280600461127e565b846004036114055780515160ff9081168352815160809081015190911660208401525f6040840181905290820151906113bc565b60405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206f7269656e746174696f6e0000000000000000000000000060448201526064016107f5565b5f61145760095490565b83106114975760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b816040516020016114a8919061398a565b60408051601f1981840301815291815281516020928301205f868152600b90935291205414905092915050565b6007602052815f5260405f2081815481106114ee575f80fd5b905f5260205f20015f91509150505481565b611508612dcf565b5f868152600b602052604090205415806115275750611527868261144d565b6115735760405162461bcd60e51b815260206004820152601060248201527f496e76616c69642070617373636f64650000000000000000000000000000000060448201526064016107f5565b61157c86611fc9565b6115bd5760405162461bcd60e51b815260206004820152601260248201527147616d65206973206e6f742061637469766560701b60448201526064016107f5565b5f6115c9868686611109565b90505f6115d68885610e5d565b5f898152600860205260409020549091506001600160a01b03161561163d5760405162461bcd60e51b815260206004820152601060248201527f47616d6520616c726561647920776f6e0000000000000000000000000000000060448201526064016107f5565b805182511461168e5760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203020646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b60208082015190830151146116e55760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203120646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b6040808201519083015114806116fd57506040820151155b6117495760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203220646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b60608082015190830151146117a05760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203320646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b60808082015190830151146117f75760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203420646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b6005546040516331a9108f60e11b8152600481018990525f916001600160a01b031690636352211e90602401602060405180830381865afa15801561183e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061186291906139a5565b5f8a815260086020908152604080832080546001600160a01b0319166001600160a01b038616179055600690915290209091506002600482015460ff1660028111156118b0576118b06131ce565b0361193d576001818101546002830154604051637921219560e11b81523060048201526001600160a01b0386811660248301526044820192909252606481019390935260a060848401525f60a4840152169063f242432a9060c4015f604051808303815f87803b158015611922575f80fd5b505af1158015611934573d5f803e3d5ffd5b505050506119cc565b6001600482015460ff166002811115611958576119586131ce565b036119cc57600181015460028201546040516323b872dd60e01b81523060048201526001600160a01b03858116602483015260448201929092529116906323b872dd906064015f604051808303815f87803b1580156119b5575f80fd5b505af11580156119c7573d5f803e3d5ffd5b505050505b600181015460028201546040519081526001600160a01b03918216918416907fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb9060200160405180910390a3816001600160a01b03168a7f458bbfe18842fd1ee1fdd14b35a34102c01abf2e5cdaba3966f19f23e51f515d8b604051611a5491815260200190565b60405180910390a3611a658a612a59565b50505050505050505050565b5f611a7b86611fc9565b611abc5760405162461bcd60e51b815260206004820152601260248201527147616d65206973206e6f742061637469766560701b60448201526064016107f5565b5f611ac8868686611109565b90505f611ad58885610e5d565b5f898152600860205260409020549091506001600160a01b031615611b3c5760405162461bcd60e51b815260206004820152601060248201527f47616d6520616c726561647920776f6e0000000000000000000000000000000060448201526064016107f5565b8051825114611b8d5760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203020646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b6020808201519083015114611be45760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203120646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b604080820151908301511480611bfc57506040820151155b611c485760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203220646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b6060808201519083015114611c9f5760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203320646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b6080808201519083015114611cf65760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203420646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b506001979650505050505050565b611d0c6129a7565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6009548210611d715760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f828152600660205260409020546001600160a01b03163314611dd65760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79206f776e65722063616e207365742070617373636f6465000000000060448201526064016107f5565b5f918252600b602052604090912055565b611def6129a7565b610df25f612e28565b6040517efdd58e000000000000000000000000000000000000000000000000000000008152336004820152602481018390525f906001600160a01b0385169062fdd58e90604401602060405180830381865afa158015611e5a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e7e91906139c0565b11611ebc5760405162461bcd60e51b815260206004820152600e60248201526d2737ba103a34329037bbb732b91760911b60448201526064016107f5565b6018811115611f0d5760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420626c6f636b20706572696f6400000000000000000000000060448201526064016107f5565b604051637921219560e11b8152336004820152306024820152604481018390526001606482015260a060848201525f60a48201526001600160a01b0384169063f242432a9060c4015f604051808303815f87803b158015611f6c575f80fd5b505af1158015611f7e573d5f803e3d5ffd5b505050505f81118015611f9357506004548114155b15611fb65780600a5f611fa560095490565b815260208101919091526040015f20555b611fc33384846002612813565b50505050565b5f805f611fd584612e77565b1015949350505050565b611fe76129a7565b610df2612f52565b5f8181526006602052604081206003015481906120415760405162461bcd60e51b815260206004820152601060248201526f11d85b59481b9bdd081cdd185c9d195960821b60448201526064016107f5565b60095483106120845760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b61208d83612e77565b91509150915091565b61209e6129a7565b6003546001600160a01b0316156120f75760405162461bcd60e51b815260206004820152601260248201527f526f6c6c657220616c726561647920736574000000000000000000000000000060448201526064016107f5565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b606061212460095490565b82106121645760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f828152600660205260409020600301546121b45760405162461bcd60e51b815260206004820152601060248201526f11d85b59481b9bdd081cdd185c9d195960821b60448201526064016107f5565b5f828152600a60205260408120546121ce576004546121dd565b5f838152600a60205260409020545b600380545f8681526006602090815260409182902093840154935482518083018a905260609190911b6bffffffffffffffffffffffff191681840152605480820186905283518083039091018152607482019384905280519201919091207f6344c8d60000000000000000000000000000000000000000000000000000000090925260788101939093526098830184905260b88301529192506001600160a01b0390911690636344c8d69060d8016108dd565b6040516331a9108f60e11b81526004810183905233906001600160a01b03851690636352211e90602401602060405180830381865afa1580156122d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122f991906139a5565b6001600160a01b0316146123405760405162461bcd60e51b815260206004820152600e60248201526d2737ba103a34329037bbb732b91760911b60448201526064016107f5565b60188111156123915760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420626c6f636b20706572696f6400000000000000000000000060448201526064016107f5565b6040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b038416906323b872dd906064015f604051808303815f87803b1580156123dc575f80fd5b505af11580156123ee573d5f803e3d5ffd5b505050505f8111801561240357506004548114155b156124265780600a5f61241560095490565b815260208101919091526040015f20555b611fc33384846001612813565b5f805b868110156124765761246389338a8a85818110612455576124556138c3565b905060200201356002612813565b508061246e816139eb565b915050612436565b507fbc197c81000000000000000000000000000000000000000000000000000000009998505050505050505050565b6124ad612dcf565b60095481106124f05760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f818152600660205260409020546001600160a01b031633146125555760405162461bcd60e51b815260206004820152601960248201527f4f6e6c79206f776e65722063616e2073746172742067616d650000000000000060448201526064016107f5565b5f818152600660205260409020600301541580612578575061257681611fc9565b155b6125c45760405162461bcd60e51b815260206004820152601060248201527f47616d6520696e2070726f67726573730000000000000000000000000000000060448201526064016107f5565b5f90815260066020526040902043600390910155565b6005546040517f98322e0d000000000000000000000000000000000000000000000000000000008152600481018390526060916001600160a01b0316906398322e0d906024015f60405180830381865afa15801561263a573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526107a89190810190613a03565b61266961300a565b6005546040516387f6368d60e01b8152600481018490526001600160a01b03909116906387f6368d9060240161032060405180830381865afa1580156126b1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a891906138d7565b5f8360011461274c5760405162461bcd60e51b815260206004820152602360248201527f43616e206f6e6c79206465706f736974203120746f6b656e206174206120746960448201527f6d652e000000000000000000000000000000000000000000000000000000000060648201526084016107f5565b6127598633876002612813565b507ff23a6e6100000000000000000000000000000000000000000000000000000000979650505050505050565b61278e6129a7565b6001600160a01b03811661280a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107f5565b610d4f81612e28565b5f61281c612dcf565b5f61282660095490565b90506040518060a00160405280876001600160a01b03168152602001866001600160a01b031681526020018581526020015f815260200184600281111561286f5761286f6131ce565b90525f82815260066020908152604091829020835181546001600160a01b039182166001600160a01b031991821617835592850151600180840180549290931691909416179055918301516002808401919091556060840151600384015560808401516004840180549193909260ff199092169184908111156128f4576128f46131ce565b021790555050506001600160a01b0386165f81815260076020908152604080832080546001810182558185528385208101879055948452600283528184208685529092529091208290559061294d600980546001019055565b866001600160a01b0316886001600160a01b0316847f6200407c0ea392b8107b21a9be480acd41fda186d04bed28cc7da2d4b53d56e28960405161299391815260200190565b60405180910390a450909695505050505050565b5f546001600160a01b03163314610df25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f5565b600260015403612a525760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107f5565b6002600155565b6009548110612a9c5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f818152600660209081526040808320546001600160a01b0316808452600783528184206002845282852086865290935292205481548490839083908110612ae657612ae66138c3565b905f5260205f20015414612b3c5760405162461bcd60e51b815260206004820152601360248201527f4461746120696e636f6e73697374656e6379210000000000000000000000000060448201526064016107f5565b81548290612b4c90600190613a75565b81548110612b5c57612b5c6138c3565b905f5260205f200154828281548110612b7757612b776138c3565b905f5260205f2001819055508060025f856001600160a01b03166001600160a01b031681526020019081526020015f205f848481548110612bba57612bba6138c3565b905f5260205f20015481526020019081526020015f208190555081805480612be457612be4613a88565b600190038181905f5260205f20015f90559055826001600160a01b0316847f06001d57b2121fa5b84eaea33e8c8ba859d1ecd77c756f77fef43ea070822f2933604051612c4091906001600160a01b0391909116815260200190565b60405180910390a350506001600160a01b03165f90815260026020908152604080832093835292905290812055565b6040517f02571be30000000000000000000000000000000000000000000000000000000081527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260048201526001600160a01b038416906302571be390602401602060405180830381865afa158015612cea573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d0e91906139a5565b6001600160a01b031663c47f002783836040518363ffffffff1660e01b8152600401612d3b929190613a9c565b6020604051808303815f875af1158015612d57573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fc391906139c0565b612d83612f94565b5f805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b5f54600160a01b900460ff1615610df25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016107f5565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f818152600a602052604081205481908190612e9557600454612ea4565b5f848152600a60205260409020545b600380545f87815260066020526040908190209092015491517f85667c030000000000000000000000000000000000000000000000000000000081529293506001600160a01b0316916385667c0391612f0a918590600401918252602082015260400190565b6040805180830381865afa158015612f24573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f489190613aca565b9250925050915091565b612f5a612dcf565b5f805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612db23390565b5f54600160a01b900460ff16610df25760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016107f5565b6040518060a001604052806005906020820280368337509192915050565b6040518060a001604052806005905b613021612fec565b8152602001906001900390816130195790505090565b5f60208284031215613047575f80fd5b81356001600160e01b03198116811461091e575f80fd5b5f6020828403121561306e575f80fd5b5035919050565b602080825282518282018190525f9190848201906040850190845b818110156130ac57835183529284019291840191600101613090565b50909695505050505050565b634e487b7160e01b5f52604160045260245ffd5b60405160a0810167ffffffffffffffff811182821017156130ef576130ef6130b8565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561311e5761311e6130b8565b604052919050565b5f82601f830112613135575f80fd5b61313d6130cc565b8060a084018581111561314e575f80fd5b845b81811015613168578035845260209384019301613150565b509095945050505050565b5f8060c08385031215613184575f80fd5b823591506131958460208501613126565b90509250929050565b805f5b6005811015611fc35781518452602093840193909101906001016131a1565b60a081016107a8828461319e565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a081016003831061322457634e487b7160e01b5f52602160045260245ffd5b8260808301529695505050505050565b6001600160a01b0381168114610d4f575f80fd5b5f8083601f840112613258575f80fd5b50813567ffffffffffffffff81111561326f575f80fd5b602083019150836020828501011115613286575f80fd5b9250929050565b5f805f805f608086880312156132a1575f80fd5b85356132ac81613234565b945060208601356132bc81613234565b935060408601359250606086013567ffffffffffffffff8111156132de575f80fd5b6132ea88828901613248565b969995985093965092949392505050565b5f6020828403121561330b575f80fd5b813561091e81613234565b5f805f60408486031215613328575f80fd5b833561333381613234565b9250602084013567ffffffffffffffff81111561334e575f80fd5b61335a86828701613248565b9497909650939450505050565b5f8060408385031215613378575f80fd5b50508035926020909101359150565b5f805f60608486031215613399575f80fd5b505081359360208301359350604090920135919050565b5f67ffffffffffffffff8211156133c9576133c96130b8565b50601f01601f191660200190565b5f82601f8301126133e6575f80fd5b81356133f96133f4826133b0565b6130f5565b81815284602083860101111561340d575f80fd5b816020850160208301375f918101602001919091529392505050565b5f806040838503121561343a575f80fd5b82359150602083013567ffffffffffffffff811115613457575f80fd5b613463858286016133d7565b9150509250929050565b5f806040838503121561347e575f80fd5b823561348981613234565b946020939093013593505050565b5f805f805f8061014087890312156134ad575f80fd5b863595506020870135945060408701359350606087013592506134d38860808901613126565b915061012087013567ffffffffffffffff8111156134ef575f80fd5b6134fb89828a016133d7565b9150509295509295509295565b5f805f805f610120868803121561351d575f80fd5b853594506020860135935060408601359250606086013591506135438760808801613126565b90509295509295909350565b5f805f60608486031215613561575f80fd5b833561356c81613234565b95602085013595506040909401359392505050565b5f8083601f840112613591575f80fd5b50813567ffffffffffffffff8111156135a8575f80fd5b6020830191508360208260051b8501011115613286575f80fd5b5f805f805f805f8060a0898b0312156135d9575f80fd5b88356135e481613234565b975060208901356135f481613234565b9650604089013567ffffffffffffffff80821115613610575f80fd5b61361c8c838d01613581565b909850965060608b0135915080821115613634575f80fd5b6136408c838d01613581565b909650945060808b0135915080821115613658575f80fd5b506136658b828c01613248565b999c989b5096995094979396929594505050565b5f5b8381101561369357818101518382015260200161367b565b50505f910152565b602081525f82518060208401526136b9816040850160208701613679565b601f01601f19169190910160400192915050565b610320810181835f805b60058082106136e65750613726565b835185845b8381101561370c57825160ff168252602092830192909101906001016136eb565b50505060a0949094019350602092909201916001016136d7565b5050505092915050565b5f805f805f8060a08789031215613745575f80fd5b863561375081613234565b9550602087013561376081613234565b94506040870135935060608701359250608087013567ffffffffffffffff811115613789575f80fd5b61379589828a01613248565b979a9699509497509295939492505050565b5f60208083850312156137b8575f80fd5b825167ffffffffffffffff808211156137cf575f80fd5b818501915085601f8301126137e2575f80fd5b8151818111156137f4576137f46130b8565b8060051b91506138058483016130f5565b818152918301840191848101908884111561381e575f80fd5b938501935b8385101561383c57845182529385019390850190613823565b98975050505050505050565b6101008101613857828761319e565b8460a08301528360c08301528260e083015295945050505050565b5f60a08284031215613882575f80fd5b82601f830112613890575f80fd5b6138986130cc565b8060a08401858111156138a9575f80fd5b845b818110156131685780518452602093840193016138ab565b634e487b7160e01b5f52603260045260245ffd5b5f6103208083850312156138e9575f80fd5b601f84818501126138f8575f80fd5b6139006130cc565b918401918086841115613911575f80fd5b855b8481101561397f578784820112613929575f8081fd5b6139316130cc565b8060a083018a811115613943575f8081fd5b835b8181101561396c57805160ff8116811461395e575f8081fd5b845260209384019301613945565b505084525060209092019160a001613913565b509695505050505050565b5f825161399b818460208701613679565b9190910192915050565b5f602082840312156139b5575f80fd5b815161091e81613234565b5f602082840312156139d0575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b5f600182016139fc576139fc6139d7565b5060010190565b5f60208284031215613a13575f80fd5b815167ffffffffffffffff811115613a29575f80fd5b8201601f81018413613a39575f80fd5b8051613a476133f4826133b0565b818152856020838501011115613a5b575f80fd5b613a6c826020830160208601613679565b95945050505050565b818103818111156107a8576107a86139d7565b634e487b7160e01b5f52603160045260245ffd5b60208152816020820152818360408301375f818301604090810191909152601f909201601f19160101919050565b5f8060408385031215613adb575f80fd5b50508051602090910151909290915056fea2646970667358221220b34e9b637002629e3b6edb4cf4a1b8bc5641a34f7d3b238e36c32f47f2ecbfb664736f6c63430008140033
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106102f9575f3560e01c80636976f93e11610192578063a2f55860116100e8578063e193890b11610093578063eb0daffd1161006e578063eb0daffd14610700578063f23a6e6114610720578063f2fde38b14610733575f80fd5b8063e193890b146106ae578063e5ed1d59146106cd578063e8bf6379146106e0575f80fd5b8063b7970ff7116100c3578063b7970ff714610661578063bc197c8114610674578063d539139314610687575f80fd5b8063a2f5586014610613578063a2fb117514610626578063b7783df01461064e575f80fd5b80637e40bcc0116101485780638b173d55116101235780638b173d55146105d25780638da5cb5b146105db57806398cef882146105eb575f80fd5b80637e40bcc0146105a457806382afd23b146105b75780638456cb59146105ca575f80fd5b80636f29162c116101785780636f29162c14610576578063700cf95614610589578063715018a61461059c575f80fd5b80636976f93e146105505780636ce9f31d14610563575f80fd5b80633447470d116102525780634d1975b4116101fd57806359769b15116101d857806359769b15146105195780635c975abb1461052c57806365df8a9d1461053d575f80fd5b80634d1975b4146104eb57806353a6d0bf146104f357806357251fd614610506575f80fd5b80633f4ba83a1161022d5780633f4ba83a146104bd578063442ba89f146104c557806348e79223146104d8575f80fd5b80633447470d1461049c578063378ec23b146104a45780633b4b145a146104aa575f80fd5b8063150b7a02116102b25780632e1a7d4d1161028d5780632e1a7d4d146104635780632f09177d146104765780633121db1c14610489575f80fd5b8063150b7a02146103ec5780632931ccca146104185780632e0683651461044e575f80fd5b80630f192442116102e25780630f19244214610350578063116213ed14610370578063117a5b9014610390575f80fd5b806301ffc9a7146102fd5780630a097c0f14610325575b5f80fd5b61031061030b366004613037565b610746565b60405190151581526020015b60405180910390f35b600554610338906001600160a01b031681565b6040516001600160a01b03909116815260200161031c565b61036361035e36600461305e565b6107ae565b60405161031c9190613075565b61038361037e366004613173565b610925565b60405161031c91906131c0565b6103db61039e36600461305e565b60066020525f9081526040902080546001820154600283015460038401546004909401546001600160a01b03938416949390921692909160ff1685565b60405161031c9594939291906131e2565b6103ff6103fa36600461328d565b610b0b565b6040516001600160e01b0319909116815260200161031c565b6104406104263660046132fb565b6001600160a01b03165f9081526007602052604090205490565b60405190815260200161031c565b61046161045c36600461305e565b610b45565b005b61046161047136600461305e565b610b52565b600354610338906001600160a01b031681565b610461610497366004613316565b610d52565b610440601881565b43610440565b6104406104b836600461305e565b610d6a565b610461610de2565b6103636104d33660046132fb565b610df4565b6103836104e6366004613173565b610e5d565b610440610fe3565b610461610501366004613367565b610ff2565b610383610514366004613387565b611109565b610310610527366004613429565b61144d565b5f54600160a01b900460ff16610310565b61044061054b36600461346d565b6114d5565b61046161055e366004613497565b611500565b610310610571366004613508565b611a71565b6104616105843660046132fb565b611d04565b610461610597366004613367565b611d2e565b610461611de7565b6104616105b236600461354f565b611df8565b6103106105c536600461305e565b611fc9565b610461611fdf565b61044060045481565b5f546001600160a01b0316610338565b6105fe6105f936600461305e565b611fef565b6040805192835260208301919091520161031c565b6104616106213660046132fb565b612096565b61033861063436600461305e565b60086020525f90815260409020546001600160a01b031681565b61036361065c36600461305e565b612119565b61046161066f36600461354f565b612290565b6103ff6106823660046135c2565b612433565b6104407f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6104406106bc36600461305e565b600b6020525f908152604090205481565b6104616106db36600461305e565b6124a5565b6106f36106ee36600461305e565b6125da565b60405161031c919061369b565b61071361070e36600461305e565b612661565b60405161031c91906136cd565b6103ff61072e366004613730565b6126d5565b6104616107413660046132fb565b612786565b5f6001600160e01b031982167f4e2312e00000000000000000000000000000000000000000000000000000000014806107a857507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60606107b960095490565b82106107fe5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064015b60405180910390fd5b5f8281526006602052604090206003015461084e5760405162461bcd60e51b815260206004820152601060248201526f11d85b59481b9bdd081cdd185c9d195960821b60448201526064016107f5565b5f828152600a602052604081205461086857600454610877565b5f838152600a60205260409020545b600380545f86815260066020526040908190209092015491517fc451dd590000000000000000000000000000000000000000000000000000000081529293506001600160a01b03169163c451dd59916108dd918590600401918252602082015260400190565b5f60405180830381865afa1580156108f7573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261091e91908101906137a7565b9392505050565b61092d612fec565b61093683611fc9565b6109775760405162461bcd60e51b815260206004820152601260248201527147616d65206973206e6f742061637469766560701b60448201526064016107f5565b60095483106109ba5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f83815260066020526040902060030154610a0a5760405162461bcd60e51b815260206004820152601060248201526f11d85b59481b9bdd081cdd185c9d195960821b60448201526064016107f5565b5f838152600a6020526040812054610a2457600454610a33565b5f848152600a60205260409020545b600380545f8781526006602090815260409182902093840154935482518083018b905260609190911b6bffffffffffffffffffffffff191681840152605480820186905283518083039091018152607490910190925281519101209293506001600160a01b0316916335f4da7091869185906040518563ffffffff1660e01b8152600401610ac49493929190613848565b60a060405180830381865afa158015610adf573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b039190613872565b949350505050565b5f610b198533866001612813565b507f150b7a02000000000000000000000000000000000000000000000000000000009695505050505050565b610b4d6129a7565b600455565b610b5a612a00565b5f818152600660205260409020546001600160a01b03163314610bb05760405162461bcd60e51b815260206004820152600e60248201526d2737ba103a34329037bbb732b91760911b60448201526064016107f5565b5f8181526006602052604090206002600482015460ff166002811115610bd857610bd86131ce565b03610c63576001818101546002830154604051637921219560e11b81523060048201523360248201526044810191909152606481019290925260a060848301525f60a48301526001600160a01b03169063f242432a9060c4015f604051808303815f87803b158015610c48575f80fd5b505af1158015610c5a573d5f803e3d5ffd5b50505050610cf1565b6001600482015460ff166002811115610c7e57610c7e6131ce565b03610cf157600181015460028201546040516323b872dd60e01b815230600482015233602482015260448101919091526001600160a01b03909116906323b872dd906064015f604051808303815f87803b158015610cda575f80fd5b505af1158015610cec573d5f803e3d5ffd5b505050505b600181015460028201546040519081526001600160a01b039091169033907fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb9060200160405180910390a3610d4582612a59565b50610d4f60018055565b50565b610d5a6129a7565b610d65838383612c6f565b505050565b5f610d7460095490565b8210610db45760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f828152600a602052604090205415610dda575f828152600a60205260409020546107a8565b505060045490565b610dea6129a7565b610df2612d7b565b565b6001600160a01b0381165f90815260076020908152604091829020805483518184028101840190945280845260609392830182828015610e5157602002820191905f5260205f20905b815481526020019060010190808311610e3d575b50505050509050919050565b610e65612fec565b610e6e83611fc9565b610eaf5760405162461bcd60e51b815260206004820152601260248201527147616d65206973206e6f742061637469766560701b60448201526064016107f5565b610eb7612fec565b5f610ec185612119565b8451815191925082918110610ed857610ed86138c3565b6020026020010151825f60058110610ef257610ef26138c3565b602002015280846001602002015181518110610f1057610f106138c3565b602002602001015182600160058110610f2b57610f2b6138c3565b602002015280846002602002015181518110610f4957610f496138c3565b602002602001015182600260058110610f6457610f646138c3565b602002015280846003602002015181518110610f8257610f826138c3565b602002602001015182600360058110610f9d57610f9d6138c3565b602002015280846004602002015181518110610fbb57610fbb6138c3565b602002602001015182600460058110610fd657610fd66138c3565b6020020152509392505050565b5f610fed60095490565b905090565b60095482106110355760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f828152600660205260409020546001600160a01b0316331461109a5760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c79206f776e65722063616e2073657420626c6f636b206672657100000060448201526064016107f5565b5f82815260066020526040902060030154156110f85760405162461bcd60e51b815260206004820152601460248201527f47616d6520616c7265616479207374617274656400000000000000000000000060448201526064016107f5565b5f918252600a602052604090912055565b611111612fec565b600582106111615760405162461bcd60e51b815260206004820152600d60248201527f496e76616c696420696e6465780000000000000000000000000000000000000060448201526064016107f5565b611169612fec565b6005546040516387f6368d60e01b8152600481018790525f916001600160a01b0316906387f6368d9060240161032060405180830381865afa1580156111b1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111d591906138d7565b9050845f0361129b578084600581106111f0576111f06138c3565b60200201515160ff16825280846005811061120d5761120d6138c3565b60200201516001602002015160ff168260016020020152808460058110611236576112366138c3565b602002015160409081015160ff169083015280846005811061125a5761125a6138c3565b602002015160609081015160ff169083015280846005811061127e5761127e6138c3565b602002015160045b602002015160ff16608083015250905061091e565b8460010361134857805184600581106112b6576112b66138c3565b6020908102919091015160ff16835281015184600581106112d9576112d96138c3565b602002015160ff16826001602002015280600260200201518460058110611302576113026138c3565b602002015160ff16604083015260608101518460058110611325576113256138c3565b602002015160ff16606083015260808101518460058110611286576112866138c3565b8460020361138c5760808101515160ff90811683526060808301516020908101518316858201525f604086018190529084015182015190921690840152819061127e565b846003036113d15780515160ff9081168352602080830151810151909116908301525f6040830152606081015160035b602002015160ff16606083015280600461127e565b846004036114055780515160ff9081168352815160809081015190911660208401525f6040840181905290820151906113bc565b60405162461bcd60e51b815260206004820152601360248201527f496e76616c6964206f7269656e746174696f6e0000000000000000000000000060448201526064016107f5565b5f61145760095490565b83106114975760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b816040516020016114a8919061398a565b60408051601f1981840301815291815281516020928301205f868152600b90935291205414905092915050565b6007602052815f5260405f2081815481106114ee575f80fd5b905f5260205f20015f91509150505481565b611508612dcf565b5f868152600b602052604090205415806115275750611527868261144d565b6115735760405162461bcd60e51b815260206004820152601060248201527f496e76616c69642070617373636f64650000000000000000000000000000000060448201526064016107f5565b61157c86611fc9565b6115bd5760405162461bcd60e51b815260206004820152601260248201527147616d65206973206e6f742061637469766560701b60448201526064016107f5565b5f6115c9868686611109565b90505f6115d68885610e5d565b5f898152600860205260409020549091506001600160a01b03161561163d5760405162461bcd60e51b815260206004820152601060248201527f47616d6520616c726561647920776f6e0000000000000000000000000000000060448201526064016107f5565b805182511461168e5760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203020646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b60208082015190830151146116e55760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203120646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b6040808201519083015114806116fd57506040820151155b6117495760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203220646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b60608082015190830151146117a05760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203320646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b60808082015190830151146117f75760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203420646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b6005546040516331a9108f60e11b8152600481018990525f916001600160a01b031690636352211e90602401602060405180830381865afa15801561183e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061186291906139a5565b5f8a815260086020908152604080832080546001600160a01b0319166001600160a01b038616179055600690915290209091506002600482015460ff1660028111156118b0576118b06131ce565b0361193d576001818101546002830154604051637921219560e11b81523060048201526001600160a01b0386811660248301526044820192909252606481019390935260a060848401525f60a4840152169063f242432a9060c4015f604051808303815f87803b158015611922575f80fd5b505af1158015611934573d5f803e3d5ffd5b505050506119cc565b6001600482015460ff166002811115611958576119586131ce565b036119cc57600181015460028201546040516323b872dd60e01b81523060048201526001600160a01b03858116602483015260448201929092529116906323b872dd906064015f604051808303815f87803b1580156119b5575f80fd5b505af11580156119c7573d5f803e3d5ffd5b505050505b600181015460028201546040519081526001600160a01b03918216918416907fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb9060200160405180910390a3816001600160a01b03168a7f458bbfe18842fd1ee1fdd14b35a34102c01abf2e5cdaba3966f19f23e51f515d8b604051611a5491815260200190565b60405180910390a3611a658a612a59565b50505050505050505050565b5f611a7b86611fc9565b611abc5760405162461bcd60e51b815260206004820152601260248201527147616d65206973206e6f742061637469766560701b60448201526064016107f5565b5f611ac8868686611109565b90505f611ad58885610e5d565b5f898152600860205260409020549091506001600160a01b031615611b3c5760405162461bcd60e51b815260206004820152601060248201527f47616d6520616c726561647920776f6e0000000000000000000000000000000060448201526064016107f5565b8051825114611b8d5760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203020646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b6020808201519083015114611be45760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203120646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b604080820151908301511480611bfc57506040820151155b611c485760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203220646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b6060808201519083015114611c9f5760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203320646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b6080808201519083015114611cf65760405162461bcd60e51b815260206004820152601460248201527f526f6c6c203420646f65736e2774206d6174636800000000000000000000000060448201526064016107f5565b506001979650505050505050565b611d0c6129a7565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6009548210611d715760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f828152600660205260409020546001600160a01b03163314611dd65760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79206f776e65722063616e207365742070617373636f6465000000000060448201526064016107f5565b5f918252600b602052604090912055565b611def6129a7565b610df25f612e28565b6040517efdd58e000000000000000000000000000000000000000000000000000000008152336004820152602481018390525f906001600160a01b0385169062fdd58e90604401602060405180830381865afa158015611e5a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e7e91906139c0565b11611ebc5760405162461bcd60e51b815260206004820152600e60248201526d2737ba103a34329037bbb732b91760911b60448201526064016107f5565b6018811115611f0d5760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420626c6f636b20706572696f6400000000000000000000000060448201526064016107f5565b604051637921219560e11b8152336004820152306024820152604481018390526001606482015260a060848201525f60a48201526001600160a01b0384169063f242432a9060c4015f604051808303815f87803b158015611f6c575f80fd5b505af1158015611f7e573d5f803e3d5ffd5b505050505f81118015611f9357506004548114155b15611fb65780600a5f611fa560095490565b815260208101919091526040015f20555b611fc33384846002612813565b50505050565b5f805f611fd584612e77565b1015949350505050565b611fe76129a7565b610df2612f52565b5f8181526006602052604081206003015481906120415760405162461bcd60e51b815260206004820152601060248201526f11d85b59481b9bdd081cdd185c9d195960821b60448201526064016107f5565b60095483106120845760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b61208d83612e77565b91509150915091565b61209e6129a7565b6003546001600160a01b0316156120f75760405162461bcd60e51b815260206004820152601260248201527f526f6c6c657220616c726561647920736574000000000000000000000000000060448201526064016107f5565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b606061212460095490565b82106121645760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f828152600660205260409020600301546121b45760405162461bcd60e51b815260206004820152601060248201526f11d85b59481b9bdd081cdd185c9d195960821b60448201526064016107f5565b5f828152600a60205260408120546121ce576004546121dd565b5f838152600a60205260409020545b600380545f8681526006602090815260409182902093840154935482518083018a905260609190911b6bffffffffffffffffffffffff191681840152605480820186905283518083039091018152607482019384905280519201919091207f6344c8d60000000000000000000000000000000000000000000000000000000090925260788101939093526098830184905260b88301529192506001600160a01b0390911690636344c8d69060d8016108dd565b6040516331a9108f60e11b81526004810183905233906001600160a01b03851690636352211e90602401602060405180830381865afa1580156122d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122f991906139a5565b6001600160a01b0316146123405760405162461bcd60e51b815260206004820152600e60248201526d2737ba103a34329037bbb732b91760911b60448201526064016107f5565b60188111156123915760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420626c6f636b20706572696f6400000000000000000000000060448201526064016107f5565b6040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b038416906323b872dd906064015f604051808303815f87803b1580156123dc575f80fd5b505af11580156123ee573d5f803e3d5ffd5b505050505f8111801561240357506004548114155b156124265780600a5f61241560095490565b815260208101919091526040015f20555b611fc33384846001612813565b5f805b868110156124765761246389338a8a85818110612455576124556138c3565b905060200201356002612813565b508061246e816139eb565b915050612436565b507fbc197c81000000000000000000000000000000000000000000000000000000009998505050505050505050565b6124ad612dcf565b60095481106124f05760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f818152600660205260409020546001600160a01b031633146125555760405162461bcd60e51b815260206004820152601960248201527f4f6e6c79206f776e65722063616e2073746172742067616d650000000000000060448201526064016107f5565b5f818152600660205260409020600301541580612578575061257681611fc9565b155b6125c45760405162461bcd60e51b815260206004820152601060248201527f47616d6520696e2070726f67726573730000000000000000000000000000000060448201526064016107f5565b5f90815260066020526040902043600390910155565b6005546040517f98322e0d000000000000000000000000000000000000000000000000000000008152600481018390526060916001600160a01b0316906398322e0d906024015f60405180830381865afa15801561263a573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526107a89190810190613a03565b61266961300a565b6005546040516387f6368d60e01b8152600481018490526001600160a01b03909116906387f6368d9060240161032060405180830381865afa1580156126b1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a891906138d7565b5f8360011461274c5760405162461bcd60e51b815260206004820152602360248201527f43616e206f6e6c79206465706f736974203120746f6b656e206174206120746960448201527f6d652e000000000000000000000000000000000000000000000000000000000060648201526084016107f5565b6127598633876002612813565b507ff23a6e6100000000000000000000000000000000000000000000000000000000979650505050505050565b61278e6129a7565b6001600160a01b03811661280a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107f5565b610d4f81612e28565b5f61281c612dcf565b5f61282660095490565b90506040518060a00160405280876001600160a01b03168152602001866001600160a01b031681526020018581526020015f815260200184600281111561286f5761286f6131ce565b90525f82815260066020908152604091829020835181546001600160a01b039182166001600160a01b031991821617835592850151600180840180549290931691909416179055918301516002808401919091556060840151600384015560808401516004840180549193909260ff199092169184908111156128f4576128f46131ce565b021790555050506001600160a01b0386165f81815260076020908152604080832080546001810182558185528385208101879055948452600283528184208685529092529091208290559061294d600980546001019055565b866001600160a01b0316886001600160a01b0316847f6200407c0ea392b8107b21a9be480acd41fda186d04bed28cc7da2d4b53d56e28960405161299391815260200190565b60405180910390a450909695505050505050565b5f546001600160a01b03163314610df25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f5565b600260015403612a525760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107f5565b6002600155565b6009548110612a9c5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a590819d85b59481251608a1b60448201526064016107f5565b5f818152600660209081526040808320546001600160a01b0316808452600783528184206002845282852086865290935292205481548490839083908110612ae657612ae66138c3565b905f5260205f20015414612b3c5760405162461bcd60e51b815260206004820152601360248201527f4461746120696e636f6e73697374656e6379210000000000000000000000000060448201526064016107f5565b81548290612b4c90600190613a75565b81548110612b5c57612b5c6138c3565b905f5260205f200154828281548110612b7757612b776138c3565b905f5260205f2001819055508060025f856001600160a01b03166001600160a01b031681526020019081526020015f205f848481548110612bba57612bba6138c3565b905f5260205f20015481526020019081526020015f208190555081805480612be457612be4613a88565b600190038181905f5260205f20015f90559055826001600160a01b0316847f06001d57b2121fa5b84eaea33e8c8ba859d1ecd77c756f77fef43ea070822f2933604051612c4091906001600160a01b0391909116815260200190565b60405180910390a350506001600160a01b03165f90815260026020908152604080832093835292905290812055565b6040517f02571be30000000000000000000000000000000000000000000000000000000081527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260048201526001600160a01b038416906302571be390602401602060405180830381865afa158015612cea573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d0e91906139a5565b6001600160a01b031663c47f002783836040518363ffffffff1660e01b8152600401612d3b929190613a9c565b6020604051808303815f875af1158015612d57573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fc391906139c0565b612d83612f94565b5f805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b5f54600160a01b900460ff1615610df25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016107f5565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f818152600a602052604081205481908190612e9557600454612ea4565b5f848152600a60205260409020545b600380545f87815260066020526040908190209092015491517f85667c030000000000000000000000000000000000000000000000000000000081529293506001600160a01b0316916385667c0391612f0a918590600401918252602082015260400190565b6040805180830381865afa158015612f24573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612f489190613aca565b9250925050915091565b612f5a612dcf565b5f805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612db23390565b5f54600160a01b900460ff16610df25760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016107f5565b6040518060a001604052806005906020820280368337509192915050565b6040518060a001604052806005905b613021612fec565b8152602001906001900390816130195790505090565b5f60208284031215613047575f80fd5b81356001600160e01b03198116811461091e575f80fd5b5f6020828403121561306e575f80fd5b5035919050565b602080825282518282018190525f9190848201906040850190845b818110156130ac57835183529284019291840191600101613090565b50909695505050505050565b634e487b7160e01b5f52604160045260245ffd5b60405160a0810167ffffffffffffffff811182821017156130ef576130ef6130b8565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561311e5761311e6130b8565b604052919050565b5f82601f830112613135575f80fd5b61313d6130cc565b8060a084018581111561314e575f80fd5b845b81811015613168578035845260209384019301613150565b509095945050505050565b5f8060c08385031215613184575f80fd5b823591506131958460208501613126565b90509250929050565b805f5b6005811015611fc35781518452602093840193909101906001016131a1565b60a081016107a8828461319e565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a081016003831061322457634e487b7160e01b5f52602160045260245ffd5b8260808301529695505050505050565b6001600160a01b0381168114610d4f575f80fd5b5f8083601f840112613258575f80fd5b50813567ffffffffffffffff81111561326f575f80fd5b602083019150836020828501011115613286575f80fd5b9250929050565b5f805f805f608086880312156132a1575f80fd5b85356132ac81613234565b945060208601356132bc81613234565b935060408601359250606086013567ffffffffffffffff8111156132de575f80fd5b6132ea88828901613248565b969995985093965092949392505050565b5f6020828403121561330b575f80fd5b813561091e81613234565b5f805f60408486031215613328575f80fd5b833561333381613234565b9250602084013567ffffffffffffffff81111561334e575f80fd5b61335a86828701613248565b9497909650939450505050565b5f8060408385031215613378575f80fd5b50508035926020909101359150565b5f805f60608486031215613399575f80fd5b505081359360208301359350604090920135919050565b5f67ffffffffffffffff8211156133c9576133c96130b8565b50601f01601f191660200190565b5f82601f8301126133e6575f80fd5b81356133f96133f4826133b0565b6130f5565b81815284602083860101111561340d575f80fd5b816020850160208301375f918101602001919091529392505050565b5f806040838503121561343a575f80fd5b82359150602083013567ffffffffffffffff811115613457575f80fd5b613463858286016133d7565b9150509250929050565b5f806040838503121561347e575f80fd5b823561348981613234565b946020939093013593505050565b5f805f805f8061014087890312156134ad575f80fd5b863595506020870135945060408701359350606087013592506134d38860808901613126565b915061012087013567ffffffffffffffff8111156134ef575f80fd5b6134fb89828a016133d7565b9150509295509295509295565b5f805f805f610120868803121561351d575f80fd5b853594506020860135935060408601359250606086013591506135438760808801613126565b90509295509295909350565b5f805f60608486031215613561575f80fd5b833561356c81613234565b95602085013595506040909401359392505050565b5f8083601f840112613591575f80fd5b50813567ffffffffffffffff8111156135a8575f80fd5b6020830191508360208260051b8501011115613286575f80fd5b5f805f805f805f8060a0898b0312156135d9575f80fd5b88356135e481613234565b975060208901356135f481613234565b9650604089013567ffffffffffffffff80821115613610575f80fd5b61361c8c838d01613581565b909850965060608b0135915080821115613634575f80fd5b6136408c838d01613581565b909650945060808b0135915080821115613658575f80fd5b506136658b828c01613248565b999c989b5096995094979396929594505050565b5f5b8381101561369357818101518382015260200161367b565b50505f910152565b602081525f82518060208401526136b9816040850160208701613679565b601f01601f19169190910160400192915050565b610320810181835f805b60058082106136e65750613726565b835185845b8381101561370c57825160ff168252602092830192909101906001016136eb565b50505060a0949094019350602092909201916001016136d7565b5050505092915050565b5f805f805f8060a08789031215613745575f80fd5b863561375081613234565b9550602087013561376081613234565b94506040870135935060608701359250608087013567ffffffffffffffff811115613789575f80fd5b61379589828a01613248565b979a9699509497509295939492505050565b5f60208083850312156137b8575f80fd5b825167ffffffffffffffff808211156137cf575f80fd5b818501915085601f8301126137e2575f80fd5b8151818111156137f4576137f46130b8565b8060051b91506138058483016130f5565b818152918301840191848101908884111561381e575f80fd5b938501935b8385101561383c57845182529385019390850190613823565b98975050505050505050565b6101008101613857828761319e565b8460a08301528360c08301528260e083015295945050505050565b5f60a08284031215613882575f80fd5b82601f830112613890575f80fd5b6138986130cc565b8060a08401858111156138a9575f80fd5b845b818110156131685780518452602093840193016138ab565b634e487b7160e01b5f52603260045260245ffd5b5f6103208083850312156138e9575f80fd5b601f84818501126138f8575f80fd5b6139006130cc565b918401918086841115613911575f80fd5b855b8481101561397f578784820112613929575f8081fd5b6139316130cc565b8060a083018a811115613943575f8081fd5b835b8181101561396c57805160ff8116811461395e575f8081fd5b845260209384019301613945565b505084525060209092019160a001613913565b509695505050505050565b5f825161399b818460208701613679565b9190910192915050565b5f602082840312156139b5575f80fd5b815161091e81613234565b5f602082840312156139d0575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b5f600182016139fc576139fc6139d7565b5060010190565b5f60208284031215613a13575f80fd5b815167ffffffffffffffff811115613a29575f80fd5b8201601f81018413613a39575f80fd5b8051613a476133f4826133b0565b818152856020838501011115613a5b575f80fd5b613a6c826020830160208601613679565b95945050505050565b818103818111156107a8576107a86139d7565b634e487b7160e01b5f52603160045260245ffd5b60208152816020820152818360408301375f818301604090810191909152601f909201601f19160101919050565b5f8060408385031215613adb575f80fd5b50508051602090910151909290915056fea2646970667358221220b34e9b637002629e3b6edb4cf4a1b8bc5641a34f7d3b238e36c32f47f2ecbfb664736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.