⚠️ ⚠️ ⚠️ This explorer will be deprecated soon, please use PolygonScan.com

Contract Address Details

0xBF79cE2fbd819e5aBC2327563D02a200255B7Cb3

dgTreasury Last Balance Update: Block #15688971
Created by 0x1fcde1–2c0f8a at 0x79e850–c28de2

Balance

0 MATIC

Fetching tokens...

Contract name:
dgTreasury




Optimization enabled
true
Compiler version
v0.7.4+commit.3f05b770




Optimization runs
200
EVM Version
default

Constructor Arguments

000000000000000000000000a1c57f48f0deb89f569dfbe6e2b7f46d33606fd4000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000044d414e4100000000000000000000000000000000000000000000000000000000

Arg [0] (address) : 0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4
Arg [1] (string) : MANA

              

Contract source code

/**
* Submitted for verification at blockscout.com on 2020-11-07 17:59:14.483712Z
*/
// SPDX-License-Identifier: -- 🎲 --
pragma solidity ^0.7.4;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, 'SafeMath: addition overflow');
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, 'SafeMath: subtraction overflow');
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, 'SafeMath: multiplication overflow');
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, 'SafeMath: division by zero');
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, 'SafeMath: modulo by zero');
return a % b;
}
}
interface ERC20Token {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(
address indexed from,
address indexed to,
uint256 value
);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract HashChain {
bytes32 public tail;
function _setTail(bytes32 _tail) internal {
tail = _tail;
}
function _consume(bytes32 _parent) internal {
require(
keccak256(
abi.encodePacked(_parent)
) == tail,
'hash-chain: wrong parent'
);
tail = _parent;
}
}
contract AccessController {
address public ceoAddress;
address public workerAddress;
bool public paused = false;
// mapping (address => enumRoles) accessRoles; // multiple operators idea
event CEOSet(address newCEO);
event WorkerSet(address newWorker);
event Paused();
event Unpaused();
constructor() {
ceoAddress = msg.sender;
workerAddress = msg.sender;
emit CEOSet(ceoAddress);
emit WorkerSet(workerAddress);
}
modifier onlyCEO() {
require(
msg.sender == ceoAddress,
'AccessControl: CEO access denied'
);
_;
}
modifier onlyWorker() {
require(
msg.sender == workerAddress,
'AccessControl: worker access denied'
);
_;
}
modifier whenNotPaused() {
require(
!paused,
'AccessControl: currently paused'
);
_;
}
modifier whenPaused {
require(
paused,
'AccessControl: currenlty not paused'
);
_;
}
function setCEO(address _newCEO) public onlyCEO {
require(
_newCEO != address(0x0),
'AccessControl: invalid CEO address'
);
ceoAddress = _newCEO;
emit CEOSet(ceoAddress);
}
function setWorker(address _newWorker) external {
require(
_newWorker != address(0x0),
'AccessControl: invalid worker address'
);
require(
msg.sender == ceoAddress || msg.sender == workerAddress,
'AccessControl: invalid worker address'
);
workerAddress = _newWorker;
emit WorkerSet(workerAddress);
}
function pause() external onlyWorker whenNotPaused {
paused = true;
emit Paused();
}
function unpause() external onlyCEO whenPaused {
paused = false;
emit Unpaused();
}
}
contract EIP712Base {
struct EIP712Domain {
string name;
string version;
uint256 chainId;
address verifyingContract;
}
bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(bytes("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"));
bytes32 internal domainSeperator;
constructor(string memory name, string memory version) {
domainSeperator = keccak256(abi.encode(
EIP712_DOMAIN_TYPEHASH,
keccak256(bytes(name)),
keccak256(bytes(version)),
getChainID(),
address(this)
));
}
function getChainID() internal pure returns (uint256 id) {
assembly {
id := 1 // set to Goerli for now, Mainnet later
}
}
function getDomainSeperator() private view returns(bytes32) {
return domainSeperator;
}
/**
* Accept message hash and returns hash message in EIP712 compatible form
* So that it can be used to recover signer from signature signed using EIP712 formatted data
* https://eips.ethereum.org/EIPS/eip-712
* "\\x19" makes the encoding deterministic
* "\\x01" is the version byte to make it compatible to EIP-191
*/
function toTypedMessageHash(bytes32 messageHash) internal view returns(bytes32) {
return keccak256(abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash));
}
}
abstract contract EIP712MetaTransaction is EIP712Base {
using SafeMath for uint256;
bytes32 private constant META_TRANSACTION_TYPEHASH =
keccak256(
bytes(
"MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
)
);
event MetaTransactionExecuted(
address userAddress,
address payable relayerAddress,
bytes functionSignature
);
mapping(address => uint256) internal nonces;
/*
* Meta transaction structure.
* No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
* He should call the desired function directly in that case.
*/
struct MetaTransaction {
uint256 nonce;
address from;
bytes functionSignature;
}
function executeMetaTransaction(
address userAddress,
bytes memory functionSignature,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
)
public
payable
returns(bytes memory)
{
MetaTransaction memory metaTx = MetaTransaction(
{
nonce: nonces[userAddress],
from: userAddress,
functionSignature: functionSignature
}
);
require(
verify(
userAddress,
metaTx,
sigR,
sigS,
sigV
), "Signer and signature do not match"
);
nonces[userAddress] =
nonces[userAddress].add(1);
// Append userAddress at the end to extract it from calling context
(bool success, bytes memory returnData) = address(this).call(
abi.encodePacked(
functionSignature,
userAddress
)
);
require(
success,
'Function call not successful'
);
emit MetaTransactionExecuted(
userAddress,
msg.sender,
functionSignature
);
return returnData;
}
function hashMetaTransaction(
MetaTransaction memory metaTx
)
internal
pure
returns (bytes32)
{
return keccak256(
abi.encode(
META_TRANSACTION_TYPEHASH,
metaTx.nonce,
metaTx.from,
keccak256(metaTx.functionSignature)
)
);
}
uint256 constant defaultTimeFrame = 12 hours;
mapping(address => uint256) public enabledTill;
mapping(address => uint256) public timeFrame;
modifier onlyEnabledOrNewAccount(address _account) {
require(
isEnabled(_account) ||
enabledTill[_account] == 0,
'Treasury: disabled account!'
);
_;
}
modifier onlyEnabledAccountStrict(address _account) {
require(
isEnabled(_account),
'Treasury: disabled account!'
);
_;
}
function enableAccount(
uint256 _sessionDuration
)
external
{
_enableAccount(
msgSender(),
_sessionDuration
);
}
event AccountEnabled(
address _user,
uint256 _sessionDuration
);
function _enableAccount(
address _user,
uint256 _sessionDuration
)
internal
{
emit AccountEnabled(
_user,
_sessionDuration
);
timeFrame[_user] = _sessionDuration;
enabledTill[_user] = block.timestamp.add(timeFrame[_user]);
}
function getTimeFrame(
address _account
)
internal
view
returns (uint256)
{
return
timeFrame[_account] > 0 ?
timeFrame[_account] : defaultTimeFrame;
}
function isEnabled(
address _account
)
public
view
returns (bool)
{
return enabledTill[_account] > block.timestamp;
}
function getNonce(
address user
)
external
view
returns(uint256 nonce)
{
nonce = nonces[user];
}
function verify(
address user,
MetaTransaction memory metaTx,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
)
internal
view
returns (bool)
{
address signer = ecrecover(
toTypedMessageHash(
hashMetaTransaction(metaTx)
),
sigV,
sigR,
sigS
);
require(
signer != address(0x0),
'Invalid signature'
);
return signer == user;
}
function msgSender() internal view returns(address sender) {
if(msg.sender == address(this)) {
bytes memory array = msg.data;
uint256 index = msg.data.length;
assembly {
// Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
sender := and(mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff)
}
} else {
sender = msg.sender;
}
return sender;
}
}
contract TransferHelper {
bytes4 private constant TRANSFER = bytes4(
keccak256(
bytes(
'transfer(address,uint256)' // 0xa9059cbb
)
)
);
bytes4 private constant TRANSFER_FROM = bytes4(
keccak256(
bytes(
'transferFrom(address,address,uint256)' // 0x23b872dd
)
)
);
function safeTransfer(
address _token,
address _to,
uint256 _value
)
internal
{
(bool success, bytes memory data) = _token.call(
abi.encodeWithSelector(
TRANSFER, // 0xa9059cbb
_to,
_value
)
);
require(
success && (
data.length == 0 || abi.decode(
data, (bool)
)
),
'TransferHelper: TRANSFER_FAILED'
);
}
function safeTransferFrom(
address _token,
address _from,
address _to,
uint _value
)
internal
{
(bool success, bytes memory data) = _token.call(
abi.encodeWithSelector(
TRANSFER_FROM,
_from,
_to,
_value
)
);
require(
success && (
data.length == 0 || abi.decode(
data, (bool)
)
),
'TransferHelper: TRANSFER_FROM_FAILED'
);
}
}
contract GameController is AccessController {
using SafeMath for uint256;
enum GameStatus { Empty, Enabled, Disabled }
struct Game {
address gameAddress;
string gameName;
}
struct GameSettings {
uint8 index;
GameStatus status;
}
Game[] public treasuryGames;
mapping(address => GameSettings) public settings;
mapping(uint8 => mapping(uint8 => uint256)) gameTokens;
mapping(uint8 => mapping(uint8 => uint128)) maximumBet;
modifier onlyDeclaredGame(uint8 _gameIndex) {
require(
settings[
treasuryGames[_gameIndex].gameAddress
].status != GameStatus.Empty,
"Treasury: game is not declared!"
);
_;
}
modifier onlyEnabledGame(uint8 _gameIndex) {
require(
settings[
treasuryGames[_gameIndex].gameAddress
].status == GameStatus.Enabled,
"Treasury: game must be enabled!"
);
_;
}
modifier onlyDisabledGame(uint8 _gameIndex) {
require(
settings[
treasuryGames[_gameIndex].gameAddress
].status == GameStatus.Disabled,
"Treasury: game must be disabled!"
);
_;
}
function addGame(
address _newGameAddress,
string calldata _newGameName,
bool _isActive
)
external
onlyCEO
{
require(
settings[_newGameAddress].status == GameStatus.Empty,
'Treasury: game already declared!'
);
treasuryGames.push(
Game(
{
gameAddress: _newGameAddress,
gameName: _newGameName
}
)
);
settings[_newGameAddress].index = uint8(treasuryGames.length - 1);
settings[_newGameAddress].status = _isActive == true
? GameStatus.Enabled
: GameStatus.Disabled;
}
function getGameIndex(
address _gameAddress
)
internal
view
returns (uint8)
{
require(
settings[_gameAddress].status != GameStatus.Empty,
'Treasury: game is not declared!'
);
return settings[_gameAddress].index;
}
function updateGameAddress(
uint8 _gameIndex,
address _newGameAddress
)
external
onlyCEO
onlyDeclaredGame(_gameIndex)
{
require(
settings[_newGameAddress].status == GameStatus.Empty,
'Treasury: game with new address already declared!'
);
settings[_newGameAddress] = settings[treasuryGames[_gameIndex].gameAddress];
delete settings[treasuryGames[_gameIndex].gameAddress];
treasuryGames[_gameIndex].gameAddress = _newGameAddress;
}
function updateGameName(
uint8 _gameIndex,
string calldata _newGameName
)
external
onlyCEO
{
treasuryGames[_gameIndex].gameName = _newGameName;
}
function enableGame(
uint8 _gameIndex
)
external
onlyCEO
onlyDisabledGame(_gameIndex)
{
settings[treasuryGames[_gameIndex].gameAddress].status = GameStatus.Enabled;
}
function disableGame(
uint8 _gameIndex
)
external
onlyCEO
onlyEnabledGame(_gameIndex)
{
settings[treasuryGames[_gameIndex].gameAddress].status = GameStatus.Disabled;
}
function addGameTokens(
uint8 _gameIndex,
uint8 _tokenIndex,
uint256 _amount
)
internal
{
gameTokens[_gameIndex][_tokenIndex] =
gameTokens[_gameIndex][_tokenIndex].add(_amount);
}
function subGameTokens(
uint8 _gameIndex,
uint8 _tokenIndex,
uint256 _amount
)
internal
{
gameTokens[_gameIndex][_tokenIndex] =
gameTokens[_gameIndex][_tokenIndex].sub(_amount);
}
}
contract TokenController is AccessController {
struct Token {
address tokenAddress;
string tokenName;
}
Token[] public treasuryTokens;
function addToken(
address _tokenAddress,
string memory _tokenName
)
public
onlyCEO
{
treasuryTokens.push(
Token(
{
tokenAddress: _tokenAddress,
tokenName: _tokenName
}
)
);
}
function getTokenInstance(
uint8 _tokenIndex
)
internal
view
returns (ERC20Token)
{
return ERC20Token(treasuryTokens[_tokenIndex].tokenAddress);
}
function getTokenAddress(
uint8 _tokenIndex
)
public
view
returns (address)
{
return treasuryTokens[_tokenIndex].tokenAddress;
}
function getTokenName(
uint8 _tokenIndex
)
external
view
returns (string memory)
{
return treasuryTokens[_tokenIndex].tokenName;
}
function updateTokenAddress(
uint8 _tokenIndex,
address _newTokenAddress
)
external
onlyCEO
{
treasuryTokens[_tokenIndex].tokenAddress = _newTokenAddress;
}
function updateTokenName(
uint8 _tokenIndex,
string calldata _newTokenName
)
external
onlyCEO
{
treasuryTokens[_tokenIndex].tokenName = _newTokenName;
}
function deleteToken(
uint8 _tokenIndex
)
external
onlyCEO
{
ERC20Token token = getTokenInstance(
_tokenIndex
);
require(
token.balanceOf(address(this)) == 0,
'TokenController: balance detected'
);
delete treasuryTokens[_tokenIndex];
}
}
contract dgTreasury is GameController, TokenController, HashChain, TransferHelper, EIP712MetaTransaction {
using SafeMath for uint256;
constructor(
address _defaultTokenAddress,
string memory _defaultTokenName
)
EIP712Base('Treasury', 'v4.0')
{
addToken(
_defaultTokenAddress,
_defaultTokenName
);
}
function disableAccount(
address _account
)
external
onlyWorker
{
enabledTill[_account] = block.timestamp;
}
function tokenInboundTransfer(
uint8 _tokenIndex,
address _from,
uint256 _amount
)
external
onlyEnabledOrNewAccount(_from)
returns (bool)
{
uint8 _gameIndex = getGameIndex(msg.sender);
address _token = getTokenAddress(_tokenIndex);
addGameTokens(
_gameIndex,
_tokenIndex,
_amount
);
safeTransferFrom(
_token,
_from,
address(this), _amount
);
enabledTill[_from] = block.timestamp.add(getTimeFrame(msg.sender));
return true;
}
function tokenOutboundTransfer(
uint8 _tokenIndex,
address _to,
uint256 _amount
)
external
onlyEnabledAccountStrict(_to)
returns (bool)
{
uint8 _gameIndex = getGameIndex(msg.sender);
address _token = getTokenAddress(_tokenIndex);
subGameTokens(
_gameIndex,
_tokenIndex,
_amount
);
safeTransfer(
_token,
_to,
_amount
);
return true;
}
function setMaximumBet(
uint8 _gameIndex,
uint8 _tokenIndex,
uint128 _maximumBet
)
external
onlyCEO
onlyDeclaredGame(_gameIndex)
{
maximumBet[_gameIndex][_tokenIndex] = _maximumBet;
}
function gameMaximumBet(
uint8 _gameIndex,
uint8 _tokenIndex
)
external
view
onlyDeclaredGame(_gameIndex)
returns (uint256)
{
return maximumBet[_gameIndex][_tokenIndex];
}
function getMaximumBet(
uint8 _tokenIndex
)
external
view
returns (uint128)
{
uint8 _gameIndex = getGameIndex(msg.sender);
return maximumBet[_gameIndex][_tokenIndex];
}
function deleteGame(
uint8 _gameIndex
)
public
onlyCEO
{
for (uint8 _tokenIndex = 0; _tokenIndex < treasuryTokens.length; _tokenIndex++) {
_withdrawGameTokens(
_gameIndex,
_tokenIndex,
gameTokens[_gameIndex][_tokenIndex]
);
gameTokens[_gameIndex][_tokenIndex] = 0;
maximumBet[_gameIndex][_tokenIndex] = 0;
}
delete treasuryGames[_gameIndex];
}
function checkApproval(
address _userAddress,
uint8 _tokenIndex
)
external
view
returns (uint256)
{
return getTokenInstance(_tokenIndex).allowance(
_userAddress,
address(this)
);
}
receive() external payable {
revert();
}
function addFunds(
uint8 _gameIndex,
uint8 _tokenIndex,
uint256 _tokenAmount
)
external
{
require(
_gameIndex < treasuryGames.length,
'Treasury: unregistered gameIndex'
);
require(
_tokenIndex < treasuryTokens.length,
'Treasury: unregistered tokenIndex'
);
ERC20Token token = getTokenInstance(
_tokenIndex
);
addGameTokens(
_gameIndex,
_tokenIndex,
_tokenAmount
);
token.transferFrom(
msg.sender,
address(this),
_tokenAmount
);
}
function checkAllocatedTokens(
uint8 _tokenIndex
)
external
view
returns (uint256)
{
uint8 _gameIndex = getGameIndex(msg.sender);
return _checkAllocatedTokens(
_gameIndex,
_tokenIndex
);
}
function _checkAllocatedTokens(
uint8 _gameIndex,
uint8 _tokenIndex
) internal view returns (uint256) {
return gameTokens[_gameIndex][_tokenIndex];
}
function checkGameTokens(
uint8 _gameIndex,
uint8 _tokenIndex
)
external
view
returns (uint256)
{
return _checkAllocatedTokens(
_gameIndex,
_tokenIndex
);
}
function _withdrawGameTokens(
uint8 _gameIndex,
uint8 _tokenIndex,
uint256 _amount
)
internal
{
ERC20Token token = getTokenInstance(
_tokenIndex
);
subGameTokens(
_gameIndex,
_tokenIndex,
_amount
);
token.transfer(
ceoAddress,
_amount
);
}
function withdrawGameTokens(
uint8 _gameIndex,
uint8 _tokenIndex,
uint256 _amount
)
external
onlyCEO
{
_withdrawGameTokens(
_gameIndex,
_tokenIndex,
_amount
);
}
function withdrawTreasuryTokens(
uint8 _tokenIndex
) public onlyCEO {
ERC20Token token = getTokenInstance(
_tokenIndex
);
uint256 amount = token.balanceOf(
address(this)
);
for (uint256 i = 0; i < treasuryGames.length; i++) {
uint8 _gameIndex = settings[treasuryGames[i].gameAddress].index;
gameTokens[_gameIndex][_tokenIndex] = 0;
}
token.transfer(
ceoAddress,
amount
);
}
function setTail(
bytes32 _tail
)
external
onlyCEO
{
_setTail(_tail);
}
function consumeHash(
bytes32 _localhash
)
external
returns (bool)
{
require(
settings[msg.sender].status == GameStatus.Enabled,
'Treasury: active-game not present'
);
_consume(_localhash);
return true;
}
}

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_defaultTokenAddress","internalType":"address"},{"type":"string","name":"_defaultTokenName","internalType":"string"}]},{"type":"event","name":"AccountEnabled","inputs":[{"type":"address","name":"_user","internalType":"address","indexed":false},{"type":"uint256","name":"_sessionDuration","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CEOSet","inputs":[{"type":"address","name":"newCEO","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"MetaTransactionExecuted","inputs":[{"type":"address","name":"userAddress","internalType":"address","indexed":false},{"type":"address","name":"relayerAddress","internalType":"address payable","indexed":false},{"type":"bytes","name":"functionSignature","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"Paused","inputs":[],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[],"anonymous":false},{"type":"event","name":"WorkerSet","inputs":[{"type":"address","name":"newWorker","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addFunds","inputs":[{"type":"uint8","name":"_gameIndex","internalType":"uint8"},{"type":"uint8","name":"_tokenIndex","internalType":"uint8"},{"type":"uint256","name":"_tokenAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addGame","inputs":[{"type":"address","name":"_newGameAddress","internalType":"address"},{"type":"string","name":"_newGameName","internalType":"string"},{"type":"bool","name":"_isActive","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addToken","inputs":[{"type":"address","name":"_tokenAddress","internalType":"address"},{"type":"string","name":"_tokenName","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ceoAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"checkAllocatedTokens","inputs":[{"type":"uint8","name":"_tokenIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"checkApproval","inputs":[{"type":"address","name":"_userAddress","internalType":"address"},{"type":"uint8","name":"_tokenIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"checkGameTokens","inputs":[{"type":"uint8","name":"_gameIndex","internalType":"uint8"},{"type":"uint8","name":"_tokenIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"consumeHash","inputs":[{"type":"bytes32","name":"_localhash","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deleteGame","inputs":[{"type":"uint8","name":"_gameIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deleteToken","inputs":[{"type":"uint8","name":"_tokenIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"disableAccount","inputs":[{"type":"address","name":"_account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"disableGame","inputs":[{"type":"uint8","name":"_gameIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"enableAccount","inputs":[{"type":"uint256","name":"_sessionDuration","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"enableGame","inputs":[{"type":"uint8","name":"_gameIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"enabledTill","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"executeMetaTransaction","inputs":[{"type":"address","name":"userAddress","internalType":"address"},{"type":"bytes","name":"functionSignature","internalType":"bytes"},{"type":"bytes32","name":"sigR","internalType":"bytes32"},{"type":"bytes32","name":"sigS","internalType":"bytes32"},{"type":"uint8","name":"sigV","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"gameMaximumBet","inputs":[{"type":"uint8","name":"_gameIndex","internalType":"uint8"},{"type":"uint8","name":"_tokenIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint128","name":"","internalType":"uint128"}],"name":"getMaximumBet","inputs":[{"type":"uint8","name":"_tokenIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"nonce","internalType":"uint256"}],"name":"getNonce","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getTokenAddress","inputs":[{"type":"uint8","name":"_tokenIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getTokenName","inputs":[{"type":"uint8","name":"_tokenIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isEnabled","inputs":[{"type":"address","name":"_account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setCEO","inputs":[{"type":"address","name":"_newCEO","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaximumBet","inputs":[{"type":"uint8","name":"_gameIndex","internalType":"uint8"},{"type":"uint8","name":"_tokenIndex","internalType":"uint8"},{"type":"uint128","name":"_maximumBet","internalType":"uint128"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTail","inputs":[{"type":"bytes32","name":"_tail","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setWorker","inputs":[{"type":"address","name":"_newWorker","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"index","internalType":"uint8"},{"type":"uint8","name":"status","internalType":"enum GameController.GameStatus"}],"name":"settings","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"tail","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"timeFrame","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"tokenInboundTransfer","inputs":[{"type":"uint8","name":"_tokenIndex","internalType":"uint8"},{"type":"address","name":"_from","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"tokenOutboundTransfer","inputs":[{"type":"uint8","name":"_tokenIndex","internalType":"uint8"},{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"gameAddress","internalType":"address"},{"type":"string","name":"gameName","internalType":"string"}],"name":"treasuryGames","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"string","name":"tokenName","internalType":"string"}],"name":"treasuryTokens","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateGameAddress","inputs":[{"type":"uint8","name":"_gameIndex","internalType":"uint8"},{"type":"address","name":"_newGameAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateGameName","inputs":[{"type":"uint8","name":"_gameIndex","internalType":"uint8"},{"type":"string","name":"_newGameName","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateTokenAddress","inputs":[{"type":"uint8","name":"_tokenIndex","internalType":"uint8"},{"type":"address","name":"_newTokenAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateTokenName","inputs":[{"type":"uint8","name":"_tokenIndex","internalType":"uint8"},{"type":"string","name":"_newTokenName","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawGameTokens","inputs":[{"type":"uint8","name":"_gameIndex","internalType":"uint8"},{"type":"uint8","name":"_tokenIndex","internalType":"uint8"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawTreasuryTokens","inputs":[{"type":"uint8","name":"_tokenIndex","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"workerAddress","inputs":[]},{"type":"receive","stateMutability":"payable"}]
            

Contract Byte Code

0x6080604052600436106102605760003560e01c806370b5e63611610144578063c2c9a884116100b6578063e2373ab31161007a578063e2373ab314610c8b578063e99405cc14610ce9578063f010b54114610d16578063f342336f14610d43578063f887cf0014610d80578063f8ce7b4b14610dbc5761026a565b8063c2c9a88414610b98578063c70620b514610bc5578063c7646ebb14610bf2578063cbd88f4814610c39578063d845317214610c4e5761026a565b80638c79ba3a116101085780638c79ba3a14610a615780639015d37114610a945780639122c23914610ac7578063a3a8df9514610af4578063ae260ac014610b30578063c26f6d4414610b655761026a565b806370b5e6361461092257806371da23e9146109af5780637749bc11146109f85780637cb8e8cd14610a225780638456cb5914610a4c5761026a565b806331297992116101dd5780635ad3f918116101a15780635ad3f918146108235780635c975abb146108505780636431930f1461086557806365afb44f1461089857806365f6517a146108c25780636ca489fb146108f55761026a565b806331297992146106b557806332b4a5941461070b5780633de6f379146107905780633f4ba83a146107cc57806341d4c74f146107e15761026a565b806313d8c8401161022457806313d8c8401461053d57806327d7874c146105645780632c613a14146105975780632c8da560146105c15780632d0335ab146106825761026a565b8063082622171461026f5780630a0f8168146103215780630c53c51c146103525780630e363e3b146104895780630ea4a4fa146105105761026a565b3661026a57600080fd5b600080fd5b34801561027b57600080fd5b506102996004803603602081101561029257600080fd5b5035610df1565b60405180836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156102e55781810151838201526020016102cd565b50505050905090810190601f1680156103125780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561032d57600080fd5b50610336610eb6565b604080516001600160a01b039092168252519081900360200190f35b610414600480360360a081101561036857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561039257600080fd5b8201836020820111156103a457600080fd5b803590602001918460018302840111600160201b831117156103c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff16610ec5565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561044e578181015183820152602001610436565b50505050905090810190601f16801561047b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561049557600080fd5b5061050e600480360360408110156104ac57600080fd5b60ff8235169190810190604081016020820135600160201b8111156104d057600080fd5b8201836020820111156104e257600080fd5b803590602001918460018302840111600160201b8311171561050357600080fd5b5090925090506111d2565b005b34801561051c57600080fd5b5061050e6004803603602081101561053357600080fd5b503560ff16611255565b34801561054957600080fd5b5061055261139f565b60408051918252519081900360200190f35b34801561057057600080fd5b5061050e6004803603602081101561058757600080fd5b50356001600160a01b03166113a5565b3480156105a357600080fd5b50610299600480360360208110156105ba57600080fd5b5035611491565b3480156105cd57600080fd5b5061050e600480360360408110156105e457600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561060e57600080fd5b82018360208201111561062057600080fd5b803590602001918460018302840111600160201b8311171561064157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506114a1945050505050565b34801561068e57600080fd5b50610552600480360360208110156106a557600080fd5b50356001600160a01b0316611599565b3480156106c157600080fd5b506106f7600480360360608110156106d857600080fd5b5060ff813516906001600160a01b0360208201351690604001356115b4565b604080519115158252519081900360200190f35b34801561071757600080fd5b5061050e6004803603604081101561072e57600080fd5b60ff8235169190810190604081016020820135600160201b81111561075257600080fd5b82018360208201111561076457600080fd5b803590602001918460018302840111600160201b8311171561078557600080fd5b50909250905061164e565b34801561079c57600080fd5b5061050e600480360360408110156107b357600080fd5b50803560ff1690602001356001600160a01b03166116ad565b3480156107d857600080fd5b5061050e61173d565b3480156107ed57600080fd5b506106f76004803603606081101561080457600080fd5b5060ff813516906001600160a01b03602082013516906040013561180a565b34801561082f57600080fd5b506103366004803603602081101561084657600080fd5b503560ff166118f3565b34801561085c57600080fd5b506106f7611925565b34801561087157600080fd5b506105526004803603602081101561088857600080fd5b50356001600160a01b0316611935565b3480156108a457600080fd5b506106f7600480360360208110156108bb57600080fd5b5035611947565b3480156108ce57600080fd5b50610552600480360360208110156108e557600080fd5b50356001600160a01b03166119bb565b34801561090157600080fd5b506104146004803603602081101561091857600080fd5b503560ff166119cd565b34801561092e57600080fd5b5061050e6004803603606081101561094557600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561096f57600080fd5b82018360208201111561098157600080fd5b803590602001918460018302840111600160201b831117156109a257600080fd5b9193509150351515611a90565b3480156109bb57600080fd5b506109dc600480360360208110156109d257600080fd5b503560ff16611c82565b604080516001600160801b039092168252519081900360200190f35b348015610a0457600080fd5b5061050e60048036036020811015610a1b57600080fd5b5035611cbf565b348015610a2e57600080fd5b5061050e60048036036020811015610a4557600080fd5b5035611d18565b348015610a5857600080fd5b5061050e611d29565b348015610a6d57600080fd5b5061050e60048036036020811015610a8457600080fd5b50356001600160a01b0316611e0f565b348015610aa057600080fd5b506106f760048036036020811015610ab757600080fd5b50356001600160a01b0316611e74565b348015610ad357600080fd5b5061050e60048036036020811015610aea57600080fd5b503560ff16611e91565b348015610b0057600080fd5b5061050e60048036036040811015610b1757600080fd5b50803560ff1690602001356001600160a01b0316612059565b348015610b3c57600080fd5b5061055260048036036040811015610b5357600080fd5b5060ff813581169160200135166122b8565b348015610b7157600080fd5b5061050e60048036036020811015610b8857600080fd5b50356001600160a01b031661237d565b348015610ba457600080fd5b5061050e60048036036020811015610bbb57600080fd5b503560ff1661247a565b348015610bd157600080fd5b5061055260048036036020811015610be857600080fd5b503560ff166125cf565b348015610bfe57600080fd5b5061050e60048036036060811015610c1557600080fd5b50803560ff90811691602081013590911690604001356001600160801b03166125ee565b348015610c4557600080fd5b50610336612712565b348015610c5a57600080fd5b5061050e60048036036060811015610c7157600080fd5b5060ff813581169160208101359091169060400135612721565b348015610c9757600080fd5b50610cbe60048036036020811015610cae57600080fd5b50356001600160a01b031661285c565b604051808360ff168152602001826002811115610cd757fe5b81526020019250505060405180910390f35b348015610cf557600080fd5b5061050e60048036036020811015610d0c57600080fd5b503560ff1661287a565b348015610d2257600080fd5b5061050e60048036036020811015610d3957600080fd5b503560ff16612993565b348015610d4f57600080fd5b5061050e60048036036060811015610d6657600080fd5b5060ff813581169160208101359091169060400135612a9b565b348015610d8c57600080fd5b5061055260048036036040811015610da357600080fd5b5080356001600160a01b0316906020013560ff16612af3565b348015610dc857600080fd5b5061055260048036036040811015610ddf57600080fd5b5060ff81358116916020013516612b8e565b60028181548110610e0157600080fd5b600091825260209182902060029182020180546001808301805460408051601f600019958416156101000295909501909216969096049283018790048702810187019095528185526001600160a01b0390921695509193909190830182828015610eac5780601f10610e8157610100808354040283529160200191610eac565b820191906000526020600020905b815481529060010190602001808311610e8f57829003601f168201915b5050505050905082565b6000546001600160a01b031681565b6060610ecf613468565b50604080516060810182526001600160a01b03881660008181526009602090815290849020548352820152908101869052610f0d8782878787612b9a565b610f485760405162461bcd60e51b815260040180806020018281038252602181526020018061377a6021913960400191505060405180910390fd5b6001600160a01b038716600090815260096020526040902054610f6c906001612c84565b60096000896001600160a01b03166001600160a01b031681526020019081526020016000208190555060006060306001600160a01b0316888a6040516020018083805190602001908083835b60208310610fd75780518252601f199092019160209182019101610fb8565b6001836020036101000a038019825116818451168082178552505050505050905001826001600160a01b031660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b6020831061104d5780518252601f19909201916020918201910161102e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146110af576040519150601f19603f3d011682016040523d82523d6000602084013e6110b4565b606091505b50915091508161110b576040805162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015290519081900360640190fd5b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b89338a60405180846001600160a01b03168152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561118a578181015183820152602001611172565b50505050905090810190601f1680156111b75780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a198975050505050505050565b6000546001600160a01b0316331461121f576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b818160028560ff168154811061123157fe5b9060005260206000209060020201600101919061124f929190613492565b50505050565b6000546001600160a01b031633146112a2576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b60006112ad826118f3565b9050806001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156112fc57600080fd5b505afa158015611310573d6000803e3d6000fd5b505050506040513d602081101561132657600080fd5b5051156113645760405162461bcd60e51b81526004018080602001828103825260218152602001806137596021913960400191505060405180910390fd5b60068260ff168154811061137457fe5b60009182526020822060029091020180546001600160a01b03191681559061124f600183018261351e565b60075481565b6000546001600160a01b031633146113f2576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b6001600160a01b0381166114375760405162461bcd60e51b81526004018080602001828103825260228152602001806136f36022913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517ff97cbb4246b709036319093e5ff31674b9f6759076d153e1bea1f60392170fc0916020908290030190a150565b60068181548110610e0157600080fd5b6000546001600160a01b031633146114ee576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b604080518082019091526001600160a01b03838116825260208083018481526006805460018101825560009190915284517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f600290920291820180546001600160a01b0319169190951617845590518051611592937ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40909301929190910190613562565b5050505050565b6001600160a01b031660009081526009602052604090205490565b6000826115c081611e74565b611611576040805162461bcd60e51b815260206004820152601b60248201527f54726561737572793a2064697361626c6564206163636f756e74210000000000604482015290519081900360640190fd5b600061161c33612cde565b90506000611629876118f3565b9050611636828887612d6d565b611641818787612dc2565b5060019695505050505050565b6000546001600160a01b0316331461169b576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b818160068560ff168154811061123157fe5b6000546001600160a01b031633146116fa576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b8060068360ff168154811061170b57fe5b6000918252602090912060029091020180546001600160a01b0319166001600160a01b03929092169190911790555050565b6000546001600160a01b0316331461178a576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b600154600160a01b900460ff166117d25760405162461bcd60e51b81526004018080602001828103825260238152602001806137bb6023913960400191505060405180910390fd5b6001805460ff60a01b191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b60008261181681611e74565b8061183757506001600160a01b0381166000908152600a6020526040902054155b611888576040805162461bcd60e51b815260206004820152601b60248201527f54726561737572793a2064697361626c6564206163636f756e74210000000000604482015290519081900360640190fd5b600061189333612cde565b905060006118a0876118f3565b90506118ad828887612f55565b6118b981873088612f7f565b6118cc6118c5336130fc565b4290612c84565b6001600160a01b0387166000908152600a6020526040902055506001925050509392505050565b600060068260ff168154811061190557fe5b60009182526020909120600290910201546001600160a01b031692915050565b600154600160a01b900460ff1681565b600b6020526000908152604090205481565b6000600133600090815260036020526040902054610100900460ff16600281111561196e57fe5b146119aa5760405162461bcd60e51b81526004018080602001828103825260218152602001806137386021913960400191505060405180910390fd5b6119b382613141565b506001919050565b600a6020526000908152604090205481565b606060068260ff16815481106119df57fe5b90600052602060002090600202016001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a845780601f10611a5957610100808354040283529160200191611a84565b820191906000526020600020905b815481529060010190602001808311611a6757829003601f168201915b50505050509050919050565b6000546001600160a01b03163314611add576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b60006001600160a01b038516600090815260036020526040902054610100900460ff166002811115611b0b57fe5b14611b5d576040805162461bcd60e51b815260206004820181905260248201527f54726561737572793a2067616d6520616c7265616479206465636c6172656421604482015290519081900360640190fd5b60026040518060400160405280866001600160a01b0316815260200185858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250939094525050835460018082018655948252602091829020845160029092020180546001600160a01b0319166001600160a01b0390921691909117815583820151805194959194611c029450918501920190613562565b50506002546001600160a01b0386166000908152600360205260409020805460ff191660001990920160ff1691909117905550801515600114611c46576002611c49565b60015b6001600160a01b0385166000908152600360205260409020805461ff001916610100836002811115611c7757fe5b021790555050505050565b600080611c8e33612cde565b60ff9081166000908152600560209081526040808320938716835292905220546001600160801b0316915050919050565b6000546001600160a01b03163314611d0c576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b611d15816131b6565b50565b611d15611d236131bb565b82613219565b6001546001600160a01b03163314611d725760405162461bcd60e51b81526004018080602001828103825260238152602001806137156023913960400191505060405180910390fd5b600154600160a01b900460ff1615611dd1576040805162461bcd60e51b815260206004820152601f60248201527f416363657373436f6e74726f6c3a2063757272656e746c792070617573656400604482015290519081900360640190fd5b6001805460ff60a01b1916600160a01b1790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6001546001600160a01b03163314611e585760405162461bcd60e51b81526004018080602001828103825260238152602001806137156023913960400191505060405180910390fd5b6001600160a01b03166000908152600a60205260409020429055565b6001600160a01b03166000908152600a6020526040902054421090565b6000546001600160a01b03163314611ede576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b6000611ee9826118f3565b90506000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611f3a57600080fd5b505afa158015611f4e573d6000803e3d6000fd5b505050506040513d6020811015611f6457600080fd5b5051905060005b600254811015611fd75760006003600060028481548110611f8857fe5b600091825260208083206002909202909101546001600160a01b0316835282810193909352604091820181205460ff908116825260048452828220908916825290925281205550600101611f6b565b50600080546040805163a9059cbb60e01b81526001600160a01b0392831660048201526024810185905290519185169263a9059cbb926044808401936020939083900390910190829087803b15801561202f57600080fd5b505af1158015612043573d6000803e3d6000fd5b505050506040513d602081101561159257600080fd5b6000546001600160a01b031633146120a6576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b8160006003600060028460ff16815481106120bd57fe5b60009182526020808320600292830201546001600160a01b031684528301939093526040909101902054610100900460ff16908111156120f957fe5b141561213a576040805162461bcd60e51b815260206004820152601f602482015260008051602061379b833981519152604482015290519081900360640190fd5b60006001600160a01b038316600090815260036020526040902054610100900460ff16600281111561216857fe5b146121a45760405162461bcd60e51b81526004018080602001828103825260318152602001806136a26031913960400191505060405180910390fd5b6003600060028560ff16815481106121b857fe5b60009182526020808320600292830201546001600160a01b03908116855284820195909552604093840183209487168352600390529190208254815460ff191660ff91821617808355845492936101009384900490921692849261ff001990921691849081111561222557fe5b02179055509050506003600060028560ff168154811061224157fe5b60009182526020808320600292830201546001600160a01b0316845283019390935260409091019020805461ffff19169055805483919060ff861690811061228557fe5b6000918252602090912060029091020180546001600160a01b0319166001600160a01b0392909216919091179055505050565b600082816003600060028460ff16815481106122d057fe5b60009182526020808320600292830201546001600160a01b031684528301939093526040909101902054610100900460ff169081111561230c57fe5b141561234d576040805162461bcd60e51b815260206004820152601f602482015260008051602061379b833981519152604482015290519081900360640190fd5b505060ff91821660009081526005602090815260408083209390941682529190915220546001600160801b031690565b6001600160a01b0381166123c25760405162461bcd60e51b81526004018080602001828103825260258152602001806135f46025913960400191505060405180910390fd5b6000546001600160a01b03163314806123e557506001546001600160a01b031633145b6124205760405162461bcd60e51b81526004018080602001828103825260258152602001806135f46025913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f54841e992da2f7bcaa3127409f02e1849c79072740593c398d6670f65f995fa7916020908290030190a150565b6000546001600160a01b031633146124c7576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b8060026003600060028460ff16815481106124de57fe5b60009182526020808320600292830201546001600160a01b031684528301939093526040909101902054610100900460ff169081111561251a57fe5b1461256c576040805162461bcd60e51b815260206004820181905260248201527f54726561737572793a2067616d65206d7573742062652064697361626c656421604482015290519081900360640190fd5b60016003600060028560ff168154811061258257fe5b60009182526020808320600292830201546001600160a01b03168452830193909352604090910190208054909161ff0019909116906101009084908111156125c657fe5b02179055505050565b6000806125db33612cde565b90506125e781846132a2565b9392505050565b6000546001600160a01b0316331461263b576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b8260006003600060028460ff168154811061265257fe5b60009182526020808320600292830201546001600160a01b031684528301939093526040909101902054610100900460ff169081111561268e57fe5b14156126cf576040805162461bcd60e51b815260206004820152601f602482015260008051602061379b833981519152604482015290519081900360640190fd5b5060ff92831660009081526005602090815260408083209490951682529290925291902080546001600160801b0319166001600160801b03909216919091179055565b6001546001600160a01b031681565b60025460ff84161061277a576040805162461bcd60e51b815260206004820181905260248201527f54726561737572793a20756e726567697374657265642067616d65496e646578604482015290519081900360640190fd5b60065460ff8316106127bd5760405162461bcd60e51b81526004018080602001828103825260218152602001806136196021913960400191505060405180910390fd5b60006127c8836118f3565b90506127d5848484612f55565b604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b038316916323b872dd9160648083019260209291908290030181600087803b15801561282a57600080fd5b505af115801561283e573d6000803e3d6000fd5b505050506040513d602081101561285457600080fd5b505050505050565b60036020526000908152604090205460ff8082169161010090041682565b6000546001600160a01b031633146128c7576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b60005b60065460ff821610156129525760ff80831660009081526004602090815260408083209385168352929052205461290490839083906132c7565b60ff80831660008181526004602090815260408083209486168084529482528083208390559282526005815282822093825292909252902080546001600160801b03191690556001016128ca565b5060028160ff168154811061296357fe5b60009182526020822060029091020180546001600160a01b03191681559061298e600183018261351e565b505050565b6000546001600160a01b031633146129e0576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b8060016003600060028460ff16815481106129f757fe5b60009182526020808320600292830201546001600160a01b031684528301939093526040909101902054610100900460ff1690811115612a3357fe5b14612a85576040805162461bcd60e51b815260206004820152601f60248201527f54726561737572793a2067616d65206d75737420626520656e61626c65642100604482015290519081900360640190fd5b60026003600060028560ff168154811061258257fe5b6000546001600160a01b03163314612ae8576040805162461bcd60e51b815260206004820181905260248201526000805160206136d3833981519152604482015290519081900360640190fd5b61298e8383836132c7565b6000612afe826118f3565b6001600160a01b031663dd62ed3e84306040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b158015612b5b57600080fd5b505afa158015612b6f573d6000803e3d6000fd5b505050506040513d6020811015612b8557600080fd5b50519392505050565b60006125e783836132a2565b6000806001612bb0612bab88613336565b6133b9565b84878760405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015612c07573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612c63576040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015290519081900360640190fd5b866001600160a01b0316816001600160a01b03161491505095945050505050565b6000828201838110156125e7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000806001600160a01b038316600090815260036020526040902054610100900460ff166002811115612d0d57fe5b1415612d4e576040805162461bcd60e51b815260206004820152601f602482015260008051602061379b833981519152604482015290519081900360640190fd5b506001600160a01b031660009081526003602052604090205460ff1690565b60ff808416600090815260046020908152604080832093861683529290522054612d979082613405565b60ff938416600090815260046020908152604080832095909616825293909352929091209190915550565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009460609489169392918291908083835b60208310612e6f5780518252601f199092019160209182019101612e50565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612ed1576040519150601f19603f3d011682016040523d82523d6000602084013e612ed6565b606091505b5091509150818015612f04575080511580612f045750808060200190516020811015612f0157600080fd5b50515b611592576040805162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b60ff808416600090815260046020908152604080832093861683529290522054612d979082612c84565b60006060856001600160a01b031660405180606001604052806025815260200161363a602591398051602091820120604080516001600160a01b03808b166024830152891660448201526064808201899052825180830390910181526084909101825292830180516001600160e01b03166001600160e01b0319909316929092178252518251909182918083835b6020831061302c5780518252601f19909201916020918201910161300d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461308e576040519150601f19603f3d011682016040523d82523d6000602084013e613093565b606091505b50915091508180156130c15750805115806130c157508080602001905160208110156130be57600080fd5b50515b6128545760405162461bcd60e51b81526004018080602001828103825260248152602001806137de6024913960400191505060405180910390fd5b6001600160a01b0381166000908152600b60205260408120546131215761a8c061313b565b6001600160a01b0382166000908152600b60205260409020545b92915050565b6007546040805160208082018590528251808303820181529183019092528051910120146131b6576040805162461bcd60e51b815260206004820152601860248201527f686173682d636861696e3a2077726f6e6720706172656e740000000000000000604482015290519081900360640190fd5b600755565b6000333014156132135760606000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506132169050565b50335b90565b604080516001600160a01b03841681526020810183905281517fc013b897e18cef75cd10c876b6b78ae296a1d877e477f5e51f021be6c5a9a4f1929181900390910190a16001600160a01b0382166000908152600b602052604090208190556132824282612c84565b6001600160a01b039092166000908152600a602052604090209190915550565b60ff918216600090815260046020908152604080832093909416825291909152205490565b60006132d2836118f3565b90506132df848484612d6d565b600080546040805163a9059cbb60e01b81526001600160a01b0392831660048201526024810186905290519184169263a9059cbb926044808401936020939083900390910190829087803b15801561282a57600080fd5b600060405180608001604052806043815260200161365f60439139805190602001208260000151836020015184604001518051906020012060405160200180858152602001848152602001836001600160a01b03168152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b60006133c3613462565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b60008282111561345c576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60085490565b60405180606001604052806000815260200160006001600160a01b03168152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826134c8576000855561350e565b82601f106134e15782800160ff1982351617855561350e565b8280016001018555821561350e579182015b8281111561350e5782358255916020019190600101906134f3565b5061351a9291506135de565b5090565b50805460018160011615610100020316600290046000825580601f106135445750611d15565b601f016020900490600052602060002090810190611d1591906135de565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282613598576000855561350e565b82601f106135b157805160ff191683800117855561350e565b8280016001018555821561350e579182015b8281111561350e5782518255916020019190600101906135c3565b5b8082111561351a57600081556001016135df56fe416363657373436f6e74726f6c3a20696e76616c696420776f726b6572206164647265737354726561737572793a20756e7265676973746572656420746f6b656e496e6465787472616e7366657246726f6d28616464726573732c616464726573732c75696e74323536294d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e61747572652954726561737572793a2067616d652077697468206e6577206164647265737320616c7265616479206465636c6172656421416363657373436f6e74726f6c3a2043454f206163636573732064656e696564416363657373436f6e74726f6c3a20696e76616c69642043454f2061646472657373416363657373436f6e74726f6c3a20776f726b6572206163636573732064656e69656454726561737572793a206163746976652d67616d65206e6f742070726573656e74546f6b656e436f6e74726f6c6c65723a2062616c616e63652064657465637465645369676e657220616e64207369676e617475726520646f206e6f74206d6174636854726561737572793a2067616d65206973206e6f74206465636c617265642100416363657373436f6e74726f6c3a2063757272656e6c7479206e6f74207061757365645472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a26469706673582212202ee39dea46b136aa399d6141ddd8b1ee21f15b63df7d65e5fdcb27eaae55a1bb64736f6c63430007040033