Polygon Sponsored slots available. Book your slot here!
Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Permantly Ban | 40870048 | 615 days ago | IN | 0 POL | 0.01490831 |
Loading...
Loading
Contract Name:
BankrollFacet
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import {WithStorage} from "../libraries/LibStorage.sol"; import {LibDiamond} from "../vendor/libraries/LibDiamond.sol"; import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * @title BankrollFacet, Contract responsible for keeping the bankroll and distribute payouts */ contract BankrollFacet is WithStorage { using SafeERC20 for IERC20; /** * @dev event emitted when game is Added or Removed * @param gameAddress address of game state that changed * @param isValid new state of game address */ event BankRoll_Game_State_Changed(address gameAddress, bool isValid); /** * @dev event emitted when token state is changed * @param tokenAddress address of token that changed state * @param isValid new state of token address */ event Bankroll_Token_State_Changed(address tokenAddress, bool isValid); /** * @dev event emitted when max payout percentage is changed * @param payout new payout percentage */ event BankRoll_Max_Payout_Changed(uint256 payout); error InvalidGameAddress(); error TransferFailed(); modifier onlyOwner() { LibDiamond.enforceIsContractOwner(); _; } /** * @dev remove funds from the bankroll */ function withdrawFunds( address tokenAddress, address to, uint256 amount ) external onlyOwner { IERC20(tokenAddress).safeTransfer(to, amount); } /** * @dev remove funds from the bankroll */ function withdrawNativeFunds( address to, uint256 amount ) external onlyOwner { (bool success, ) = payable(to).call{value: amount}(""); if (!success) { revert TransferFailed(); } } /** * @dev Function to enable or disable games to distribute bankroll payouts * @param game contract address of game to change state * @param isValid state to set the address to */ function setGame(address game, bool isValid) external onlyOwner { gs().isGame[game] = isValid; emit BankRoll_Game_State_Changed(game, isValid); } /** * @dev function to get if game is allowed to access the bankroll * @param game address of the game contract */ function getIsGame(address game) external view returns (bool) { return (gs().isGame[game]); } /** * @dev function to check if payout can be given * @param game address of the game contract * @param tokenAddress address of the token the wager is made */ function getIsValidWager( address game, address tokenAddress ) external view returns (bool) { return (gs().isGame[game] && gs().isTokenAllowed[tokenAddress]); } /** * @dev function to set if a given token can be wagered * @param tokenAddress address of the token to set address * @param isValid state to set the address to */ function setTokenAddress( address tokenAddress, bool isValid ) external onlyOwner { gs().isTokenAllowed[tokenAddress] = isValid; emit Bankroll_Token_State_Changed(tokenAddress, isValid); } /** * @dev function to set the wrapped token contract of the native asset * @param wrapped address of the wrapped token contract */ function setWrappedAddress(address wrapped) external onlyOwner { gs().wrappedToken = wrapped; } /** * @dev function that games call to transfer payout * @param player address of the player to transfer payout to * @param payout amount of payout to transfer * @param tokenAddress address of the token to transfer, 0 address is the native token */ function transferPayout( address player, uint256 payout, address tokenAddress ) external { if (!gs().isGame[msg.sender]) { revert InvalidGameAddress(); } if (tokenAddress != address(0)) { IERC20(tokenAddress).safeTransfer(player, payout); } else { (bool success, ) = payable(player).call{value: payout, gas: 2400}( "" ); if (!success) { (bool _success, ) = gs().wrappedToken.call{value: payout}( abi.encodeWithSignature("deposit()") ); if (!_success) { revert(); } IERC20(gs().wrappedToken).safeTransfer(player, payout); } } } error AlreadySuspended(uint256 suspensionTime); error TimeRemaingOnSuspension(uint256 suspensionTime); /** * @dev Suspend player by a certain amount time. This function can only be used if the player is not suspended since it could be used to lower suspension time. * @param suspensionTime Time to be suspended for in seconds. */ function suspend(uint256 suspensionTime) external { if (gs().suspendedTime[msg.sender] > block.timestamp) { revert AlreadySuspended(gs().suspendedTime[msg.sender]); } gs().suspendedTime[msg.sender] = block.timestamp + suspensionTime; gs().isPlayerSuspended[msg.sender] = true; } /** * @dev Increse suspension time of a player by a certain amount of time. This function is intended to only be used as a complement to the suspend() function to increase suspension time. * @param suspensionTime Time to increase suspension time for in seconds. */ function increaseSuspensionTime(uint256 suspensionTime) external { gs().suspendedTime[msg.sender] += suspensionTime; gs().isPlayerSuspended[msg.sender] = true; } /** * @dev Permantly suspend player. This function sets suspension time to the maximum allowed time. */ function permantlyBan() external { gs().suspendedTime[msg.sender] = 2 ** 256 - 1; gs().isPlayerSuspended[msg.sender] = true; } /** * @dev Lift suspension after the required amount of time has passed */ function liftSuspension() external { if (gs().suspendedTime[msg.sender] > block.timestamp) { revert TimeRemaingOnSuspension(gs().suspendedTime[msg.sender]); } gs().isPlayerSuspended[msg.sender] = false; } /** * @dev Function to view player suspension status. * @param player Address of the * @return bool is player suspended * @return uint256 time that unlock period ends */ function isPlayerSuspended( address player ) external view returns (bool, uint256) { return (gs().isPlayerSuspended[player], gs().suspendedTime[player]); } /** * @dev function to get Address of current bankroll Owner */ function getOwner() external view returns (address) { return LibDiamond.contractOwner(); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; /** * @title Storage for Bankroll */ struct GameStorage { mapping(address => bool) isGame; mapping(address => bool) isTokenAllowed; address[] allowedTokens; //Can be used to iterate through all tokens in bankroll to determine it's value address wrappedToken; mapping(address => uint256) suspendedTime; mapping(address => bool) isPlayerSuspended; } library LibStorage { bytes32 constant GAME_STORAGE_POSITION = keccak256("zkasino.storage.game"); function gameStorage() internal pure returns (GameStorage storage gs) { bytes32 position = GAME_STORAGE_POSITION; assembly { gs.slot := position } } } contract WithStorage { function gs() internal pure returns (GameStorage storage) { return LibStorage.gameStorage(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ import { IDiamondCut } from "../interfaces/IDiamondCut.sol"; // Remember to add the loupe functions from DiamondLoupeFacet to the diamond. // The loupe functions are required by the EIP2535 Diamonds standard library LibDiamond { bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage"); struct DiamondStorage { // maps function selectors to the facets that execute the functions. // and maps the selectors to their position in the selectorSlots array. // func selector => address facet, selector position mapping(bytes4 => bytes32) facets; // array of slots of function selectors. // each slot holds 8 function selectors. mapping(uint256 => bytes32) selectorSlots; // The number of function selectors in selectorSlots uint16 selectorCount; // Used to query if a contract implements an interface. // Used to implement ERC-165. mapping(bytes4 => bool) supportedInterfaces; // owner of the contract address contractOwner; } function diamondStorage() internal pure returns (DiamondStorage storage ds) { bytes32 position = DIAMOND_STORAGE_POSITION; assembly { ds.slot := position } } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function setContractOwner(address _newOwner) internal { DiamondStorage storage ds = diamondStorage(); address previousOwner = ds.contractOwner; ds.contractOwner = _newOwner; emit OwnershipTransferred(previousOwner, _newOwner); } function contractOwner() internal view returns (address contractOwner_) { contractOwner_ = diamondStorage().contractOwner; } function enforceIsContractOwner() internal view { require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner"); } event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata); bytes32 constant CLEAR_ADDRESS_MASK = bytes32(uint256(0xffffffffffffffffffffffff)); bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224)); // Internal function version of diamondCut // This code is almost the same as the external diamondCut, // except it is using 'Facet[] memory _diamondCut' instead of // 'Facet[] calldata _diamondCut'. // The code is duplicated to prevent copying calldata to memory which // causes an error for a two dimensional array. function diamondCut( IDiamondCut.FacetCut[] memory _diamondCut, address _init, bytes memory _calldata ) internal { DiamondStorage storage ds = diamondStorage(); uint256 originalSelectorCount = ds.selectorCount; uint256 selectorCount = originalSelectorCount; bytes32 selectorSlot; // Check if last selector slot is not full // "selectorCount & 7" is a gas efficient modulo by eight "selectorCount % 8" if (selectorCount & 7 > 0) { // get last selectorSlot // "selectorSlot >> 3" is a gas efficient division by 8 "selectorSlot / 8" selectorSlot = ds.selectorSlots[selectorCount >> 3]; } // loop through diamond cut for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) { (selectorCount, selectorSlot) = addReplaceRemoveFacetSelectors( selectorCount, selectorSlot, _diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].action, _diamondCut[facetIndex].functionSelectors ); } if (selectorCount != originalSelectorCount) { ds.selectorCount = uint16(selectorCount); } // If last selector slot is not full // "selectorCount & 7" is a gas efficient modulo by eight "selectorCount % 8" if (selectorCount & 7 > 0) { // "selectorSlot >> 3" is a gas efficient division by 8 "selectorSlot / 8" ds.selectorSlots[selectorCount >> 3] = selectorSlot; } emit DiamondCut(_diamondCut, _init, _calldata); initializeDiamondCut(_init, _calldata); } function addReplaceRemoveFacetSelectors( uint256 _selectorCount, bytes32 _selectorSlot, address _newFacetAddress, IDiamondCut.FacetCutAction _action, bytes4[] memory _selectors ) internal returns (uint256, bytes32) { DiamondStorage storage ds = diamondStorage(); require(_selectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); if (_action == IDiamondCut.FacetCutAction.Add) { enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Add facet has no code"); for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) { bytes4 selector = _selectors[selectorIndex]; bytes32 oldFacet = ds.facets[selector]; require(address(bytes20(oldFacet)) == address(0), "LibDiamondCut: Can't add function that already exists"); // add facet for selector ds.facets[selector] = bytes20(_newFacetAddress) | bytes32(_selectorCount); // "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8" uint256 selectorInSlotPosition = (_selectorCount & 7) << 5; // clear selector position in slot and add selector _selectorSlot = (_selectorSlot & ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) | (bytes32(selector) >> selectorInSlotPosition); // if slot is full then write it to storage if (selectorInSlotPosition == 224) { // "_selectorSlot >> 3" is a gas efficient division by 8 "_selectorSlot / 8" ds.selectorSlots[_selectorCount >> 3] = _selectorSlot; _selectorSlot = 0; } _selectorCount++; } } else if (_action == IDiamondCut.FacetCutAction.Replace) { enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Replace facet has no code"); for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) { bytes4 selector = _selectors[selectorIndex]; bytes32 oldFacet = ds.facets[selector]; address oldFacetAddress = address(bytes20(oldFacet)); // only useful if immutable functions exist require(oldFacetAddress != address(this), "LibDiamondCut: Can't replace immutable function"); require(oldFacetAddress != _newFacetAddress, "LibDiamondCut: Can't replace function with same function"); require(oldFacetAddress != address(0), "LibDiamondCut: Can't replace function that doesn't exist"); // replace old facet address ds.facets[selector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(_newFacetAddress); } } else if (_action == IDiamondCut.FacetCutAction.Remove) { require(_newFacetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)"); // "_selectorCount >> 3" is a gas efficient division by 8 "_selectorCount / 8" uint256 selectorSlotCount = _selectorCount >> 3; // "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8" uint256 selectorInSlotIndex = _selectorCount & 7; for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) { if (_selectorSlot == 0) { // get last selectorSlot selectorSlotCount--; _selectorSlot = ds.selectorSlots[selectorSlotCount]; selectorInSlotIndex = 7; } else { selectorInSlotIndex--; } bytes4 lastSelector; uint256 oldSelectorsSlotCount; uint256 oldSelectorInSlotPosition; // adding a block here prevents stack too deep error { bytes4 selector = _selectors[selectorIndex]; bytes32 oldFacet = ds.facets[selector]; require(address(bytes20(oldFacet)) != address(0), "LibDiamondCut: Can't remove function that doesn't exist"); // only useful if immutable functions exist require(address(bytes20(oldFacet)) != address(this), "LibDiamondCut: Can't remove immutable function"); // replace selector with last selector in ds.facets // gets the last selector lastSelector = bytes4(_selectorSlot << (selectorInSlotIndex << 5)); if (lastSelector != selector) { // update last selector slot position info ds.facets[lastSelector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(ds.facets[lastSelector]); } delete ds.facets[selector]; uint256 oldSelectorCount = uint16(uint256(oldFacet)); // "oldSelectorCount >> 3" is a gas efficient division by 8 "oldSelectorCount / 8" oldSelectorsSlotCount = oldSelectorCount >> 3; // "oldSelectorCount & 7" is a gas efficient modulo by eight "oldSelectorCount % 8" oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5; } if (oldSelectorsSlotCount != selectorSlotCount) { bytes32 oldSelectorSlot = ds.selectorSlots[oldSelectorsSlotCount]; // clears the selector we are deleting and puts the last selector in its place. oldSelectorSlot = (oldSelectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) | (bytes32(lastSelector) >> oldSelectorInSlotPosition); // update storage with the modified slot ds.selectorSlots[oldSelectorsSlotCount] = oldSelectorSlot; } else { // clears the selector we are deleting and puts the last selector in its place. _selectorSlot = (_selectorSlot & ~(CLEAR_SELECTOR_MASK >> oldSelectorInSlotPosition)) | (bytes32(lastSelector) >> oldSelectorInSlotPosition); } if (selectorInSlotIndex == 0) { delete ds.selectorSlots[selectorSlotCount]; _selectorSlot = 0; } } _selectorCount = selectorSlotCount * 8 + selectorInSlotIndex; } else { revert("LibDiamondCut: Incorrect FacetCutAction"); } return (_selectorCount, _selectorSlot); } function initializeDiamondCut(address _init, bytes memory _calldata) internal { if (_init == address(0)) { require(_calldata.length == 0, "LibDiamondCut: _init is address(0) but_calldata is not empty"); } else { require(_calldata.length > 0, "LibDiamondCut: _calldata is empty but _init is not address(0)"); if (_init != address(this)) { enforceHasContractCode(_init, "LibDiamondCut: _init address has no code"); } (bool success, bytes memory error) = _init.delegatecall(_calldata); if (!success) { if (error.length > 0) { // bubble up the error revert(string(error)); } else { revert("LibDiamondCut: _init function reverted"); } } } } function enforceHasContractCode(address _contract, string memory _errorMessage) internal view { uint256 contractSize; assembly { contractSize := extcodesize(_contract) } require(contractSize > 0, _errorMessage); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /******************************************************************************\ * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen) * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ interface IDiamondCut { enum FacetCutAction {Add, Replace, Remove} // Add=0, Replace=1, Remove=2 struct FacetCut { address facetAddress; FacetCutAction action; bytes4[] functionSelectors; } /// @notice Add/replace/remove any number of functions and optionally execute /// a function with delegatecall /// @param _diamondCut Contains the facet addresses and function selectors /// @param _init The address of the contract or facet to execute _calldata /// @param _calldata A function call, including function selector and arguments /// _calldata is executed with delegatecall on _init function diamondCut( FacetCut[] calldata _diamondCut, address _init, bytes calldata _calldata ) external; event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"suspensionTime","type":"uint256"}],"name":"AlreadySuspended","type":"error"},{"inputs":[],"name":"InvalidGameAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"suspensionTime","type":"uint256"}],"name":"TimeRemaingOnSuspension","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"gameAddress","type":"address"},{"indexed":false,"internalType":"bool","name":"isValid","type":"bool"}],"name":"BankRoll_Game_State_Changed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"payout","type":"uint256"}],"name":"BankRoll_Max_Payout_Changed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"bool","name":"isValid","type":"bool"}],"name":"Bankroll_Token_State_Changed","type":"event"},{"inputs":[{"internalType":"address","name":"game","type":"address"}],"name":"getIsGame","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"game","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"getIsValidWager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"suspensionTime","type":"uint256"}],"name":"increaseSuspensionTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"}],"name":"isPlayerSuspended","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liftSuspension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"permantlyBan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"game","type":"address"},{"internalType":"bool","name":"isValid","type":"bool"}],"name":"setGame","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"bool","name":"isValid","type":"bool"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wrapped","type":"address"}],"name":"setWrappedAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"suspensionTime","type":"uint256"}],"name":"suspend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"},{"internalType":"uint256","name":"payout","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"transferPayout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawNativeFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061108b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063509cac541161008c578063893d20e811610066578063893d20e81461026d578063b0836e2e1461028d578063bfd7f9cc146102a0578063f59b7f71146102b357600080fd5b8063509cac54146102345780636c025ec2146102475780638177334f1461025a57600080fd5b8063298729d8116100c8578063298729d8146101ab5780632a0b5e9e146102065780633d9f0e52146102195780634b8658461461022157600080fd5b80630a5748a8146100ef5780631c20fadd1461018357806326792aca14610198575b600080fd5b6101676100fd366004610e2d565b6001600160a01b031660009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba35495622860209081526040808320547fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562279092529091205460ff90911691565b6040805192151583526020830191909152015b60405180910390f35b610196610191366004610e48565b610311565b005b6101966101a6366004610e84565b610332565b6101f66101b9366004610e2d565b6001600160a01b031660009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956223602052604090205460ff1690565b604051901515815260200161017a565b610196610214366004610ebf565b6103c7565b610196610452565b61019661022f366004610ef6565b61053b565b610196610242366004610e2d565b610659565b610196610255366004610f0f565b6106ba565b610196610268366004610ef6565b6108c9565b610275610935565b6040516001600160a01b03909116815260200161017a565b61019661029b366004610ebf565b61096d565b6101f66102ae366004610f4b565b6109f0565b6101963360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba35495622760205260409020600019905560017fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956223610517565b610319610a75565b61032d6001600160a01b0384168383610b19565b505050565b61033a610a75565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610387576040519150601f19603f3d011682016040523d82523d6000602084013e61038c565b606091505b505090508061032d576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103cf610a75565b6001600160a01b03821660008181527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562246020908152604091829020805460ff19168515159081179091558251938452908301527fd371cc87ec694236589d1bdc930c8276a4335e3b49a288dc5ee58da7f094d7a891015b60405180910390a15050565b3360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba35495622760205260409020544210156104f3573360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562276020526040908190205490517f5d60b9ed00000000000000000000000000000000000000000000000000000000815260048101919091526024015b60405180910390fd5b60007fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562235b33600090815260059190910160205260409020805460ff1916911515919091179055565b3360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba35495622760205260409020544210156105d7573360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562276020526040908190205490517f20faaa9500000000000000000000000000000000000000000000000000000000815260048101919091526024016104ea565b6105e18142610f7e565b3360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956227602052604090205560017fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562235b33600090815260059190910160205260409020805460ff191691151591909117905550565b610661610a75565b7fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba35495622680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b3360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956223602052604090205460ff16610722576040517f9b8d1cd900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116156107455761032d6001600160a01b0382168484610b19565b6000836001600160a01b03168361096090604051600060405180830381858888f193505050503d8060008114610797576040519150601f19603f3d011682016040523d82523d6000602084013e61079c565b606091505b50509050806108c35760007fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562236003015460408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd0e30db00000000000000000000000000000000000000000000000000000000017905290516001600160a01b0390921691869161083b91610fe9565b60006040518083038185875af1925050503d8060008114610878576040519150601f19603f3d011682016040523d82523d6000602084013e61087d565b606091505b505090508061088b57600080fd5b7fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956226546108c1906001600160a01b03168686610b19565b505b50505050565b3360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956227602052604081208054839290610907908490610f7e565b90915550600190507fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956223610634565b60006109687fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c1320546001600160a01b031690565b905090565b610975610a75565b6001600160a01b03821660008181527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562236020908152604091829020805460ff19168515159081179091558251938452908301527fdbd1aaf28b8f98e5d4e0c894cc0a5d00595709f1f072f52fa3fbab1a0802aa219101610446565b6001600160a01b03821660009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956223602052604081205460ff168015610a6e57506001600160a01b03821660009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956224602052604090205460ff165b9392505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c600401546001600160a01b03163314610b175760405162461bcd60e51b815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f657200000000000000000000000000000000000000000000000000000000000060648201526084016104ea565b565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261032d9084906000610be9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c799092919063ffffffff16565b80519091501561032d5780806020019051810190610c079190611005565b61032d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104ea565b6060610c888484600085610c90565b949350505050565b606082471015610d085760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104ea565b6001600160a01b0385163b610d5f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104ea565b600080866001600160a01b03168587604051610d7b9190610fe9565b60006040518083038185875af1925050503d8060008114610db8576040519150601f19603f3d011682016040523d82523d6000602084013e610dbd565b606091505b5091509150610dcd828286610dd8565b979650505050505050565b60608315610de7575081610a6e565b825115610df75782518084602001fd5b8160405162461bcd60e51b81526004016104ea9190611022565b80356001600160a01b0381168114610e2857600080fd5b919050565b600060208284031215610e3f57600080fd5b610a6e82610e11565b600080600060608486031215610e5d57600080fd5b610e6684610e11565b9250610e7460208501610e11565b9150604084013590509250925092565b60008060408385031215610e9757600080fd5b610ea083610e11565b946020939093013593505050565b8015158114610ebc57600080fd5b50565b60008060408385031215610ed257600080fd5b610edb83610e11565b91506020830135610eeb81610eae565b809150509250929050565b600060208284031215610f0857600080fd5b5035919050565b600080600060608486031215610f2457600080fd5b610f2d84610e11565b925060208401359150610f4260408501610e11565b90509250925092565b60008060408385031215610f5e57600080fd5b610f6783610e11565b9150610f7560208401610e11565b90509250929050565b60008219821115610fb8577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b60005b83811015610fd8578181015183820152602001610fc0565b838111156108c35750506000910152565b60008251610ffb818460208701610fbd565b9190910192915050565b60006020828403121561101757600080fd5b8151610a6e81610eae565b6020815260008251806020840152611041816040850160208701610fbd565b601f01601f1916919091016040019291505056fea2646970667358221220111229342770f23ad9b5ad9d4e0e964de5561771f7a22a3eadf5575d0e82540d64736f6c634300080b0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063509cac541161008c578063893d20e811610066578063893d20e81461026d578063b0836e2e1461028d578063bfd7f9cc146102a0578063f59b7f71146102b357600080fd5b8063509cac54146102345780636c025ec2146102475780638177334f1461025a57600080fd5b8063298729d8116100c8578063298729d8146101ab5780632a0b5e9e146102065780633d9f0e52146102195780634b8658461461022157600080fd5b80630a5748a8146100ef5780631c20fadd1461018357806326792aca14610198575b600080fd5b6101676100fd366004610e2d565b6001600160a01b031660009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba35495622860209081526040808320547fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562279092529091205460ff90911691565b6040805192151583526020830191909152015b60405180910390f35b610196610191366004610e48565b610311565b005b6101966101a6366004610e84565b610332565b6101f66101b9366004610e2d565b6001600160a01b031660009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956223602052604090205460ff1690565b604051901515815260200161017a565b610196610214366004610ebf565b6103c7565b610196610452565b61019661022f366004610ef6565b61053b565b610196610242366004610e2d565b610659565b610196610255366004610f0f565b6106ba565b610196610268366004610ef6565b6108c9565b610275610935565b6040516001600160a01b03909116815260200161017a565b61019661029b366004610ebf565b61096d565b6101f66102ae366004610f4b565b6109f0565b6101963360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba35495622760205260409020600019905560017fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956223610517565b610319610a75565b61032d6001600160a01b0384168383610b19565b505050565b61033a610a75565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610387576040519150601f19603f3d011682016040523d82523d6000602084013e61038c565b606091505b505090508061032d576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103cf610a75565b6001600160a01b03821660008181527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562246020908152604091829020805460ff19168515159081179091558251938452908301527fd371cc87ec694236589d1bdc930c8276a4335e3b49a288dc5ee58da7f094d7a891015b60405180910390a15050565b3360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba35495622760205260409020544210156104f3573360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562276020526040908190205490517f5d60b9ed00000000000000000000000000000000000000000000000000000000815260048101919091526024015b60405180910390fd5b60007fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562235b33600090815260059190910160205260409020805460ff1916911515919091179055565b3360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba35495622760205260409020544210156105d7573360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562276020526040908190205490517f20faaa9500000000000000000000000000000000000000000000000000000000815260048101919091526024016104ea565b6105e18142610f7e565b3360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956227602052604090205560017fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562235b33600090815260059190910160205260409020805460ff191691151591909117905550565b610661610a75565b7fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba35495622680547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b3360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956223602052604090205460ff16610722576040517f9b8d1cd900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038116156107455761032d6001600160a01b0382168484610b19565b6000836001600160a01b03168361096090604051600060405180830381858888f193505050503d8060008114610797576040519150601f19603f3d011682016040523d82523d6000602084013e61079c565b606091505b50509050806108c35760007fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562236003015460408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd0e30db00000000000000000000000000000000000000000000000000000000017905290516001600160a01b0390921691869161083b91610fe9565b60006040518083038185875af1925050503d8060008114610878576040519150601f19603f3d011682016040523d82523d6000602084013e61087d565b606091505b505090508061088b57600080fd5b7fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956226546108c1906001600160a01b03168686610b19565b505b50505050565b3360009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956227602052604081208054839290610907908490610f7e565b90915550600190507fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956223610634565b60006109687fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c1320546001600160a01b031690565b905090565b610975610a75565b6001600160a01b03821660008181527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba3549562236020908152604091829020805460ff19168515159081179091558251938452908301527fdbd1aaf28b8f98e5d4e0c894cc0a5d00595709f1f072f52fa3fbab1a0802aa219101610446565b6001600160a01b03821660009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956223602052604081205460ff168015610a6e57506001600160a01b03821660009081527fa36eda17de021c045724d0bd9efd8066fc220af24328dff97db3cba354956224602052604090205460ff165b9392505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c600401546001600160a01b03163314610b175760405162461bcd60e51b815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f657200000000000000000000000000000000000000000000000000000000000060648201526084016104ea565b565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261032d9084906000610be9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c799092919063ffffffff16565b80519091501561032d5780806020019051810190610c079190611005565b61032d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104ea565b6060610c888484600085610c90565b949350505050565b606082471015610d085760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104ea565b6001600160a01b0385163b610d5f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104ea565b600080866001600160a01b03168587604051610d7b9190610fe9565b60006040518083038185875af1925050503d8060008114610db8576040519150601f19603f3d011682016040523d82523d6000602084013e610dbd565b606091505b5091509150610dcd828286610dd8565b979650505050505050565b60608315610de7575081610a6e565b825115610df75782518084602001fd5b8160405162461bcd60e51b81526004016104ea9190611022565b80356001600160a01b0381168114610e2857600080fd5b919050565b600060208284031215610e3f57600080fd5b610a6e82610e11565b600080600060608486031215610e5d57600080fd5b610e6684610e11565b9250610e7460208501610e11565b9150604084013590509250925092565b60008060408385031215610e9757600080fd5b610ea083610e11565b946020939093013593505050565b8015158114610ebc57600080fd5b50565b60008060408385031215610ed257600080fd5b610edb83610e11565b91506020830135610eeb81610eae565b809150509250929050565b600060208284031215610f0857600080fd5b5035919050565b600080600060608486031215610f2457600080fd5b610f2d84610e11565b925060208401359150610f4260408501610e11565b90509250925092565b60008060408385031215610f5e57600080fd5b610f6783610e11565b9150610f7560208401610e11565b90509250929050565b60008219821115610fb8577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b60005b83811015610fd8578181015183820152602001610fc0565b838111156108c35750506000910152565b60008251610ffb818460208701610fbd565b9190910192915050565b60006020828403121561101757600080fd5b8151610a6e81610eae565b6020815260008251806020840152611041816040850160208701610fbd565b601f01601f1916919091016040019291505056fea2646970667358221220111229342770f23ad9b5ad9d4e0e964de5561771f7a22a3eadf5575d0e82540d64736f6c634300080b0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 29 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.