Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 15784237 | 692 days ago | IN | 0 ETH | 0.0410701 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
KoboldHealthBoosterFacet
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Unlicensed pragma solidity 0.8.17; import "@solidstate/contracts/access/ownable/Ownable.sol"; import "../libraries/LibKoboldHealthBoosters.sol"; import {KoboldHealthBooster} from "../interfaces/IKoboldHealthBooster.sol"; import "../libraries/LibAppStorage.sol"; ///@author @0xSimon_ contract KoboldHealthBoosterFacet is Ownable { function setKoboldHealthBooster(KoboldHealthBooster memory koboldHealthBooster) external onlyOwner { LibKoboldHealthBoosters.setKoboldHealthBooster(koboldHealthBooster); } //Returns a KoboldHealthBooster function getKoboldHealthBooster(uint koboldHealthBoosterId) external view returns(KoboldHealthBooster memory) { KoboldHealthBooster memory healthBooster = LibKoboldHealthBoosters.getKoboldHealthBooster(koboldHealthBoosterId); if(bytes(healthBooster.name).length == 0 ) revert ("Inexistent healthBooster"); return healthBooster; } //User Can Purchase Kobold healthBooster Using Ingot Token function purchaseKoboldHealthBooster(uint koboldHealthBoosterId,uint quantity) external { address ingotAddress = LibAppStorage.getIngotTokenAddress(); KoboldHealthBooster memory healthBooster = LibKoboldHealthBoosters.getKoboldHealthBooster(koboldHealthBoosterId); IERC20Like(ingotAddress).transferFrom(msg.sender,address(this),healthBooster.price*quantity); LibKoboldHealthBoosters.purchaseKoboldHealthBooster(msg.sender,koboldHealthBoosterId,quantity); } //We Get User Balance function getKoboldHealthBoosterUserBalance(address user, uint koboldHealthBoosterId) external view returns(uint) { return LibKoboldHealthBoosters.getKoboldHealthBoosterBalance(user,koboldHealthBoosterId); } //Approve And Unapprove healthBooster Spenders... This Will Be Reserved For The Staking Contracts To Use function approveKoboldHealthBoosterSpender(address spender) external onlyOwner { LibKoboldHealthBoosters.approveKoboldHealthBoosterSpender(spender); } function unapproveKoboldHealthBoosterSpender(address spender) external onlyOwner { LibKoboldHealthBoosters.unapproveKoboldHealthBoosterSpender(spender); } function queryBatchKoboldHealthBoosters(uint[] calldata koboldHealthBoosterIds) external view returns(KoboldHealthBooster[] memory) { return LibKoboldHealthBoosters.queryBatchKoboldHealthBoosters(koboldHealthBoosterIds); } function queryUserBalanceBatchHealthBoosters(address account,uint[] calldata koboldHealthBoosterIds) external view returns(uint[] memory) { return LibKoboldHealthBoosters.queryUserBalanceBatchHealthBoosters(account,koboldHealthBoosterIds); } function useKoboldHealthBooster(address from,uint koboldTokenId,uint koboldHealthBoosterId,uint quantity) external { LibKoboldHealthBoosters.useKoboldHealthBooster(from,koboldTokenId,koboldHealthBoosterId,quantity); } } interface IERC20Like { function transferFrom(address from, address to,uint amount) external; }
// SPDX-License-Identifier: Unlicensed pragma solidity 0.8.17; import {AppStorage} from "../interfaces/IAppStorage.sol"; ///@author @0xSimon_ library LibAppStorage { bytes32 internal constant NAMESPACE = keccak256("titanforge.items.diamond.appstorage"); function appStorage() internal pure returns(AppStorage storage s) { bytes32 position = NAMESPACE; assembly{ s.slot := position } } function setIngotTokenAddress(address _ingot) internal { AppStorage storage s = appStorage(); s.ingotTokenAddress = _ingot; } function setKoboldAddress(address _koboldAddress) internal { AppStorage storage s = appStorage(); s.koboldAddress = _koboldAddress; } function setTitanAddress(address _titanAddress) internal { AppStorage storage s = appStorage(); s.titanAddress = _titanAddress; } function getIngotTokenAddress() internal view returns(address) { AppStorage storage s = appStorage(); return s.ingotTokenAddress; } function getKoboldAddress() internal view returns(address) { AppStorage storage s = appStorage(); return s.koboldAddress; } function getTitanAddress() internal view returns(address) { AppStorage storage s = appStorage(); return s.titanAddress; } }
// SPDX-License-Identifier: Unlicensed pragma solidity 0.8.17; import {KoboldHealthBooster} from "../interfaces/IKoboldHealthBooster.sol"; ///@author @0xSimon_ library LibKoboldHealthBoosters { //Storage bytes32 internal constant NAMESPACE = keccak256("titanforge.kobold.health.items"); event KoboldHealthBoosterUsed(uint indexed koboldTokenId,uint indexed healthToGive,uint indexed quantityUsed); struct Storage{ mapping(uint => KoboldHealthBooster) koboldHealthBoosters; mapping(address => mapping(uint => uint)) balanceOfKoboldHealthBoosters; mapping(address => bool) approvedKoboldHealthBoosterPurchaser; mapping(address => bool) approvedKoboldHealthBoosterSpender; uint koboldHealthBoosterIdTracker; } function getStorage() internal pure returns(Storage storage s) { bytes32 position = NAMESPACE; assembly{ s.slot := position } } function purchaseKoboldHealthBooster(address from,uint koboldHealthBoosterId,uint quantity) internal { Storage storage s = getStorage(); KoboldHealthBooster memory booster = s.koboldHealthBoosters[koboldHealthBoosterId]; require(booster.isAvailableForPurchase,"Not For Sale"); // if(booster.quantitySold + quantity > booster.maxQuantity) revert ("Sold Out"); // s.booster[koboldHealthBoosterId].quantitySold = booster.quantitySold + quantity; s.balanceOfKoboldHealthBoosters[from][koboldHealthBoosterId] += quantity; } function useKoboldHealthBooster(address from,uint koboldTokenId,uint koboldHealthBoosterId,uint quantity) internal { Storage storage s = getStorage(); if(msg.sender != tx.origin) { require(s.approvedKoboldHealthBoosterSpender[msg.sender] , "Not Approved Spender"); } if(quantity > s.balanceOfKoboldHealthBoosters[from][koboldHealthBoosterId]) revert ("Kobold healthBooster: Insufficient healthBooster Balance"); s.balanceOfKoboldHealthBoosters[from][koboldHealthBoosterId] -= quantity; emit KoboldHealthBoosterUsed(koboldTokenId,s.koboldHealthBoosters[koboldHealthBoosterId].healthBoost,quantity); } function getKoboldHealthBooster(uint koboldHealthBoosterId) internal view returns(KoboldHealthBooster memory) { Storage storage s = getStorage(); return s.koboldHealthBoosters[koboldHealthBoosterId]; } function queryBatchKoboldHealthBoosters(uint[] calldata koboldHealthBoosterIds) internal view returns(KoboldHealthBooster[] memory) { uint len = koboldHealthBoosterIds.length; KoboldHealthBooster[] memory KoboldHealthBoosters = new KoboldHealthBooster[](len); for(uint i; i < len;){ uint id = koboldHealthBoosterIds[i]; KoboldHealthBoosters[i] = getKoboldHealthBooster(id); unchecked{++i;} } return KoboldHealthBoosters; } function queryUserBalanceBatchHealthBoosters(address account,uint[] calldata koboldHealthBoosterIds) internal view returns(uint[] memory) { uint len = koboldHealthBoosterIds.length; uint[] memory koboldHealthBoosters = new uint[](len); for(uint i; i < len;){ uint id = koboldHealthBoosterIds[i]; koboldHealthBoosters[i] = getKoboldHealthBoosterBalance(account,id); unchecked{++i;} } return koboldHealthBoosters; } function getKoboldHealthBoosterBalance(address user,uint koboldHealthBoosterId) internal view returns(uint) { Storage storage s = getStorage(); return s.balanceOfKoboldHealthBoosters[user][koboldHealthBoosterId]; } function approveKoboldHealthBoosterSpender(address spender) internal { Storage storage s = getStorage(); s.approvedKoboldHealthBoosterSpender[spender] = true; } function unapproveKoboldHealthBoosterSpender(address spender) internal { Storage storage s = getStorage(); delete s.approvedKoboldHealthBoosterSpender[spender]; } function setKoboldHealthBooster(KoboldHealthBooster memory koboldHealthBooster) internal { Storage storage s = getStorage(); s.koboldHealthBoosters[s.koboldHealthBoosterIdTracker] = koboldHealthBooster; ++s.koboldHealthBoosterIdTracker; } function overrideExistingHealthBooster(uint healthBoosterId,KoboldHealthBooster memory koboldHealthBooster) internal { Storage storage s = getStorage(); s.koboldHealthBoosters[healthBoosterId] = koboldHealthBooster; } }
// SPDX-License-Identifier: Unlicensed pragma solidity 0.8.17; struct KoboldHealthBooster { uint price; bool isAvailableForPurchase; uint healthBoost; string name; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC173 } from '../IERC173.sol'; import { IOwnable } from './IOwnable.sol'; import { OwnableInternal } from './OwnableInternal.sol'; import { OwnableStorage } from './OwnableStorage.sol'; /** * @title Ownership access control based on ERC173 */ abstract contract Ownable is IOwnable, OwnableInternal { using OwnableStorage for OwnableStorage.Layout; /** * @inheritdoc IERC173 */ function owner() public view virtual returns (address) { return _owner(); } /** * @inheritdoc IERC173 */ function transferOwnership(address account) public virtual onlyOwner { _transferOwnership(account); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; struct AppStorage { address ingotTokenAddress; address koboldAddress; address titanAddress; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC173Internal } from './IERC173Internal.sol'; /** * @title Contract ownership standard interface * @dev see https://eips.ethereum.org/EIPS/eip-173 */ interface IERC173 is IERC173Internal { /** * @notice get the ERC173 contract owner * @return conrtact owner */ function owner() external view returns (address); /** * @notice transfer contract ownership to new account * @param account address of new owner */ function transferOwnership(address account) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC173 } from '../IERC173.sol'; interface IOwnable is IERC173 {}
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; library OwnableStorage { struct Layout { address owner; } bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.Ownable'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } function setOwner(Layout storage l, address owner) internal { l.owner = owner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { AddressUtils } from '../../utils/AddressUtils.sol'; import { IERC173 } from '../IERC173.sol'; import { IOwnableInternal } from './IOwnableInternal.sol'; import { OwnableStorage } from './OwnableStorage.sol'; abstract contract OwnableInternal is IOwnableInternal { using AddressUtils for address; using OwnableStorage for OwnableStorage.Layout; modifier onlyOwner() { require(msg.sender == _owner(), 'Ownable: sender must be owner'); _; } modifier onlyTransitiveOwner() { require( msg.sender == _transitiveOwner(), 'Ownable: sender must be transitive owner' ); _; } function _owner() internal view virtual returns (address) { return OwnableStorage.layout().owner; } function _transitiveOwner() internal view virtual returns (address) { address owner = _owner(); while (owner.isContract()) { try IERC173(owner).owner() returns (address transitiveOwner) { owner = transitiveOwner; } catch { return owner; } } return owner; } function _transferOwnership(address account) internal virtual { OwnableStorage.layout().setOwner(account); emit OwnershipTransferred(msg.sender, account); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; /** * @title Partial ERC173 interface needed by internal functions */ interface IERC173Internal { event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { UintUtils } from './UintUtils.sol'; library AddressUtils { using UintUtils for uint256; function toString(address account) internal pure returns (string memory) { return uint256(uint160(account)).toHexString(20); } function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable account, uint256 amount) internal { (bool success, ) = account.call{ value: amount }(''); require(success, 'AddressUtils: failed to send value'); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, 'AddressUtils: failed low-level call'); } function functionCall( address target, bytes memory data, string memory error ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, error); } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue( target, data, value, 'AddressUtils: failed low-level call with value' ); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory error ) internal returns (bytes memory) { require( address(this).balance >= value, 'AddressUtils: insufficient balance for call' ); return _functionCallWithValue(target, data, value, error); } function _functionCallWithValue( address target, bytes memory data, uint256 value, string memory error ) private returns (bytes memory) { require( isContract(target), 'AddressUtils: function call to non-contract' ); (bool success, bytes memory returnData) = target.call{ value: value }( data ); if (success) { return returnData; } else if (returnData.length > 0) { assembly { let returnData_size := mload(returnData) revert(add(32, returnData), returnData_size) } } else { revert(error); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import { IERC173Internal } from '../IERC173Internal.sol'; interface IOwnableInternal is IERC173Internal {}
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; /** * @title utility functions for uint256 operations * @dev derived from https://github.com/OpenZeppelin/openzeppelin-contracts/ (MIT license) */ library UintUtils { bytes16 private constant HEX_SYMBOLS = '0123456789abcdef'; function toString(uint256 value) internal pure returns (string memory) { if (value == 0) { return '0'; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return '0x00'; } uint256 length = 0; for (uint256 temp = value; temp != 0; temp >>= 8) { unchecked { length++; } } return toHexString(value, length); } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = '0'; buffer[1] = 'x'; unchecked { for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_SYMBOLS[value & 0xf]; value >>= 4; } } require(value == 0, 'UintUtils: hex length insufficient'); return string(buffer); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"approveKoboldHealthBoosterSpender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"koboldHealthBoosterId","type":"uint256"}],"name":"getKoboldHealthBooster","outputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bool","name":"isAvailableForPurchase","type":"bool"},{"internalType":"uint256","name":"healthBoost","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct KoboldHealthBooster","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"koboldHealthBoosterId","type":"uint256"}],"name":"getKoboldHealthBoosterUserBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"koboldHealthBoosterId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"purchaseKoboldHealthBooster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"koboldHealthBoosterIds","type":"uint256[]"}],"name":"queryBatchKoboldHealthBoosters","outputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bool","name":"isAvailableForPurchase","type":"bool"},{"internalType":"uint256","name":"healthBoost","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct KoboldHealthBooster[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"koboldHealthBoosterIds","type":"uint256[]"}],"name":"queryUserBalanceBatchHealthBoosters","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bool","name":"isAvailableForPurchase","type":"bool"},{"internalType":"uint256","name":"healthBoost","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct KoboldHealthBooster","name":"koboldHealthBooster","type":"tuple"}],"name":"setKoboldHealthBooster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"unapproveKoboldHealthBoosterSpender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"koboldTokenId","type":"uint256"},{"internalType":"uint256","name":"koboldHealthBoosterId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"useKoboldHealthBooster","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506112b2806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a85760003560e01c80638da5cb5b116100715780638da5cb5b146101325780639cc68abb14610152578063a87df25a14610172578063c5080c7614610185578063eaded70c14610198578063f2fde38b146101b857600080fd5b8062238faf146100ad578063230ab477146100d65780633ab820fb146100eb578063791fe6d91461010c5780637e51c9101461011f575b600080fd5b6100c06100bb366004610c1d565b6101cb565b6040516100cd9190610ca7565b60405180910390f35b6100e96100e4366004610cd6565b610265565b005b6100fe6100f9366004610cf1565b6102e5565b6040519081526020016100cd565b6100e961011a366004610d1b565b6102f8565b6100e961012d366004610d54565b61030a565b61013a6103df565b6040516001600160a01b0390911681526020016100cd565b610165610160366004610dc2565b6103ee565b6040516100cd9190610e04565b6100e9610180366004610cd6565b6103fa565b6100e9610193366004610ed6565b610476565b6101ab6101a6366004610fc3565b6104b7565b6040516100cd9190611016565b6100e96101c6366004610cd6565b6104cc565b6101f860405180608001604052806000815260200160001515815260200160008152602001606081525090565b60006102038361050d565b905080606001515160000361025f5760405162461bcd60e51b815260206004820152601860248201527f496e6578697374656e74206865616c7468426f6f73746572000000000000000060448201526064015b60405180910390fd5b92915050565b61026d610625565b6001600160a01b0316336001600160a01b03161461029d5760405162461bcd60e51b81526004016102569061105a565b6001600160a01b03811660009081527f7133055fb8f4facbf0f7ec5a7a08fe58dfc2981bda3880be393d767cd1228d5560205260409020805460ff1916600117905550565b50565b60006102f18383610653565b9392505050565b6103048484848461069a565b50505050565b600061033d7fcb6b060b17f6d0199a862b45fdf6389003947547eadcf7dddc35ddb1430a9387546001600160a01b031690565b9050600061034a8461050d565b9050816001600160a01b03166323b872dd333086856000015161036d91906110a7565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156103bc57600080fd5b505af11580156103d0573d6000803e3d6000fd5b50505050610304338585610821565b60006103e9610625565b905090565b60606102f18383610985565b610402610625565b6001600160a01b0316336001600160a01b0316146104325760405162461bcd60e51b81526004016102569061105a565b6102e2816001600160a01b031660009081527f7133055fb8f4facbf0f7ec5a7a08fe58dfc2981bda3880be393d767cd1228d5560205260409020805460ff19169055565b61047e610625565b6001600160a01b0316336001600160a01b0316146104ae5760405162461bcd60e51b81526004016102569061105a565b6102e281610a64565b60606104c4848484610afe565b949350505050565b6104d4610625565b6001600160a01b0316336001600160a01b0316146105045760405162461bcd60e51b81526004016102569061105a565b6102e281610baa565b61053a60405180608001604052806000815260200160001515815260200160008152602001606081525090565b600082815260008051602061125d8339815191526020818152604092839020835160808101855281548152600182015460ff161515928101929092526002810154938201939093526003830180549293919260608401919061059b906110be565b80601f01602080910402602001604051908101604052809291908181526020018280546105c7906110be565b80156106145780601f106105e957610100808354040283529160200191610614565b820191906000526020600020905b8154815290600101906020018083116105f757829003601f168201915b505050505081525050915050919050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f671680460546001600160a01b031690565b6001600160a01b039190911660009081527f7133055fb8f4facbf0f7ec5a7a08fe58dfc2981bda3880be393d767cd1228d5360209081526040808320938352929052205490565b60008051602061125d8339815191523233146107085733600090815260038201602052604090205460ff166107085760405162461bcd60e51b81526020600482015260146024820152732737ba1020b8383937bb32b21029b832b73232b960611b6044820152606401610256565b6001600160a01b038516600090815260018201602090815260408083208684529091529020548211156107a35760405162461bcd60e51b815260206004820152603860248201527f4b6f626f6c64206865616c7468426f6f737465723a20496e737566666963696560448201527f6e74206865616c7468426f6f737465722042616c616e636500000000000000006064820152608401610256565b6001600160a01b03851660009081526001820160209081526040808320868452909152812080548492906107d89084906110f8565b9091555050600083815260208290526040808220600201549051849287917f43b1958aaf30e275c667d264440fa9d8a24d705ae06522bacca9f286e80a5a069190a45050505050565b600082815260008051602061125d83398151915260208181526040808420815160808101835281548152600182015460ff16151593810193909352600281015491830191909152600381018054939493606084019190610880906110be565b80601f01602080910402602001604051908101604052809291908181526020018280546108ac906110be565b80156108f95780601f106108ce576101008083540402835291602001916108f9565b820191906000526020600020905b8154815290600101906020018083116108dc57829003601f168201915b505050505081525050905080602001516109445760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420466f722053616c6560a01b6044820152606401610256565b6001600160a01b038516600090815260018301602090815260408083208784529091528120805485929061097990849061110b565b90915550505050505050565b60608160008167ffffffffffffffff8111156109a3576109a3610e66565b604051908082528060200260200182016040528015610a0157816020015b6109ee60405180608001604052806000815260200160001515815260200160008152602001606081525090565b8152602001906001900390816109c15790505b50905060005b82811015610a5b576000868683818110610a2357610a2361111e565b905060200201359050610a358161050d565b838381518110610a4757610a4761111e565b602090810291909101015250600101610a07565b50949350505050565b7f7133055fb8f4facbf0f7ec5a7a08fe58dfc2981bda3880be393d767cd1228d5654600090815260008051602061125d8339815191526020818152604092839020845181559084015160018201805460ff19169115159190911790559183015160028301556060830151909183916003820190610ae19082611183565b509050508060040160008154610af690611243565b909155505050565b60608160008167ffffffffffffffff811115610b1c57610b1c610e66565b604051908082528060200260200182016040528015610b45578160200160208202803683370190505b50905060005b82811015610ba0576000868683818110610b6757610b6761111e565b905060200201359050610b7a8882610653565b838381518110610b8c57610b8c61111e565b602090810291909101015250600101610b4b565b5095945050505050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046080546001600160a01b0319166001600160a01b0383161790556040516001600160a01b0382169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350565b600060208284031215610c2f57600080fd5b5035919050565b80518252600060208083015115158185015260408301516040850152606083015160806060860152805180608087015260005b81811015610c855782810184015187820160a001528301610c69565b50600060a0828801015260a0601f19601f830116870101935050505092915050565b6020815260006102f16020830184610c36565b80356001600160a01b0381168114610cd157600080fd5b919050565b600060208284031215610ce857600080fd5b6102f182610cba565b60008060408385031215610d0457600080fd5b610d0d83610cba565b946020939093013593505050565b60008060008060808587031215610d3157600080fd5b610d3a85610cba565b966020860135965060408601359560600135945092505050565b60008060408385031215610d6757600080fd5b50508035926020909101359150565b60008083601f840112610d8857600080fd5b50813567ffffffffffffffff811115610da057600080fd5b6020830191508360208260051b8501011115610dbb57600080fd5b9250929050565b60008060208385031215610dd557600080fd5b823567ffffffffffffffff811115610dec57600080fd5b610df885828601610d76565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610e5957603f19888603018452610e47858351610c36565b94509285019290850190600101610e2b565b5092979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715610e9f57610e9f610e66565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610ece57610ece610e66565b604052919050565b60006020808385031215610ee957600080fd5b823567ffffffffffffffff80821115610f0157600080fd5b9084019060808287031215610f1557600080fd5b610f1d610e7c565b82358152838301358015158114610f3357600080fd5b8185015260408381013590820152606083013582811115610f5357600080fd5b80840193505086601f840112610f6857600080fd5b823582811115610f7a57610f7a610e66565b610f8c601f8201601f19168601610ea5565b92508083528785828601011115610fa257600080fd5b80858501868501376000908301909401939093526060830152509392505050565b600080600060408486031215610fd857600080fd5b610fe184610cba565b9250602084013567ffffffffffffffff811115610ffd57600080fd5b61100986828701610d76565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b8181101561104e57835183529284019291840191600101611032565b50909695505050505050565b6020808252601d908201527f4f776e61626c653a2073656e646572206d757374206265206f776e6572000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761025f5761025f611091565b600181811c908216806110d257607f821691505b6020821081036110f257634e487b7160e01b600052602260045260246000fd5b50919050565b8181038181111561025f5761025f611091565b8082018082111561025f5761025f611091565b634e487b7160e01b600052603260045260246000fd5b601f82111561117e57600081815260208120601f850160051c8101602086101561115b5750805b601f850160051c820191505b8181101561117a57828155600101611167565b5050505b505050565b815167ffffffffffffffff81111561119d5761119d610e66565b6111b1816111ab84546110be565b84611134565b602080601f8311600181146111e657600084156111ce5750858301515b600019600386901b1c1916600185901b17855561117a565b600085815260208120601f198616915b82811015611215578886015182559484019460019091019084016111f6565b50858210156112335787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001820161125557611255611091565b506001019056fe7133055fb8f4facbf0f7ec5a7a08fe58dfc2981bda3880be393d767cd1228d52a2646970667358221220bfee3c01b767c0727160df76c81ac835db0f16b07bdc97163a87f4ec91536b0f64736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a85760003560e01c80638da5cb5b116100715780638da5cb5b146101325780639cc68abb14610152578063a87df25a14610172578063c5080c7614610185578063eaded70c14610198578063f2fde38b146101b857600080fd5b8062238faf146100ad578063230ab477146100d65780633ab820fb146100eb578063791fe6d91461010c5780637e51c9101461011f575b600080fd5b6100c06100bb366004610c1d565b6101cb565b6040516100cd9190610ca7565b60405180910390f35b6100e96100e4366004610cd6565b610265565b005b6100fe6100f9366004610cf1565b6102e5565b6040519081526020016100cd565b6100e961011a366004610d1b565b6102f8565b6100e961012d366004610d54565b61030a565b61013a6103df565b6040516001600160a01b0390911681526020016100cd565b610165610160366004610dc2565b6103ee565b6040516100cd9190610e04565b6100e9610180366004610cd6565b6103fa565b6100e9610193366004610ed6565b610476565b6101ab6101a6366004610fc3565b6104b7565b6040516100cd9190611016565b6100e96101c6366004610cd6565b6104cc565b6101f860405180608001604052806000815260200160001515815260200160008152602001606081525090565b60006102038361050d565b905080606001515160000361025f5760405162461bcd60e51b815260206004820152601860248201527f496e6578697374656e74206865616c7468426f6f73746572000000000000000060448201526064015b60405180910390fd5b92915050565b61026d610625565b6001600160a01b0316336001600160a01b03161461029d5760405162461bcd60e51b81526004016102569061105a565b6001600160a01b03811660009081527f7133055fb8f4facbf0f7ec5a7a08fe58dfc2981bda3880be393d767cd1228d5560205260409020805460ff1916600117905550565b50565b60006102f18383610653565b9392505050565b6103048484848461069a565b50505050565b600061033d7fcb6b060b17f6d0199a862b45fdf6389003947547eadcf7dddc35ddb1430a9387546001600160a01b031690565b9050600061034a8461050d565b9050816001600160a01b03166323b872dd333086856000015161036d91906110a7565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156103bc57600080fd5b505af11580156103d0573d6000803e3d6000fd5b50505050610304338585610821565b60006103e9610625565b905090565b60606102f18383610985565b610402610625565b6001600160a01b0316336001600160a01b0316146104325760405162461bcd60e51b81526004016102569061105a565b6102e2816001600160a01b031660009081527f7133055fb8f4facbf0f7ec5a7a08fe58dfc2981bda3880be393d767cd1228d5560205260409020805460ff19169055565b61047e610625565b6001600160a01b0316336001600160a01b0316146104ae5760405162461bcd60e51b81526004016102569061105a565b6102e281610a64565b60606104c4848484610afe565b949350505050565b6104d4610625565b6001600160a01b0316336001600160a01b0316146105045760405162461bcd60e51b81526004016102569061105a565b6102e281610baa565b61053a60405180608001604052806000815260200160001515815260200160008152602001606081525090565b600082815260008051602061125d8339815191526020818152604092839020835160808101855281548152600182015460ff161515928101929092526002810154938201939093526003830180549293919260608401919061059b906110be565b80601f01602080910402602001604051908101604052809291908181526020018280546105c7906110be565b80156106145780601f106105e957610100808354040283529160200191610614565b820191906000526020600020905b8154815290600101906020018083116105f757829003601f168201915b505050505081525050915050919050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f671680460546001600160a01b031690565b6001600160a01b039190911660009081527f7133055fb8f4facbf0f7ec5a7a08fe58dfc2981bda3880be393d767cd1228d5360209081526040808320938352929052205490565b60008051602061125d8339815191523233146107085733600090815260038201602052604090205460ff166107085760405162461bcd60e51b81526020600482015260146024820152732737ba1020b8383937bb32b21029b832b73232b960611b6044820152606401610256565b6001600160a01b038516600090815260018201602090815260408083208684529091529020548211156107a35760405162461bcd60e51b815260206004820152603860248201527f4b6f626f6c64206865616c7468426f6f737465723a20496e737566666963696560448201527f6e74206865616c7468426f6f737465722042616c616e636500000000000000006064820152608401610256565b6001600160a01b03851660009081526001820160209081526040808320868452909152812080548492906107d89084906110f8565b9091555050600083815260208290526040808220600201549051849287917f43b1958aaf30e275c667d264440fa9d8a24d705ae06522bacca9f286e80a5a069190a45050505050565b600082815260008051602061125d83398151915260208181526040808420815160808101835281548152600182015460ff16151593810193909352600281015491830191909152600381018054939493606084019190610880906110be565b80601f01602080910402602001604051908101604052809291908181526020018280546108ac906110be565b80156108f95780601f106108ce576101008083540402835291602001916108f9565b820191906000526020600020905b8154815290600101906020018083116108dc57829003601f168201915b505050505081525050905080602001516109445760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420466f722053616c6560a01b6044820152606401610256565b6001600160a01b038516600090815260018301602090815260408083208784529091528120805485929061097990849061110b565b90915550505050505050565b60608160008167ffffffffffffffff8111156109a3576109a3610e66565b604051908082528060200260200182016040528015610a0157816020015b6109ee60405180608001604052806000815260200160001515815260200160008152602001606081525090565b8152602001906001900390816109c15790505b50905060005b82811015610a5b576000868683818110610a2357610a2361111e565b905060200201359050610a358161050d565b838381518110610a4757610a4761111e565b602090810291909101015250600101610a07565b50949350505050565b7f7133055fb8f4facbf0f7ec5a7a08fe58dfc2981bda3880be393d767cd1228d5654600090815260008051602061125d8339815191526020818152604092839020845181559084015160018201805460ff19169115159190911790559183015160028301556060830151909183916003820190610ae19082611183565b509050508060040160008154610af690611243565b909155505050565b60608160008167ffffffffffffffff811115610b1c57610b1c610e66565b604051908082528060200260200182016040528015610b45578160200160208202803683370190505b50905060005b82811015610ba0576000868683818110610b6757610b6761111e565b905060200201359050610b7a8882610653565b838381518110610b8c57610b8c61111e565b602090810291909101015250600101610b4b565b5095945050505050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046080546001600160a01b0319166001600160a01b0383161790556040516001600160a01b0382169033907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350565b600060208284031215610c2f57600080fd5b5035919050565b80518252600060208083015115158185015260408301516040850152606083015160806060860152805180608087015260005b81811015610c855782810184015187820160a001528301610c69565b50600060a0828801015260a0601f19601f830116870101935050505092915050565b6020815260006102f16020830184610c36565b80356001600160a01b0381168114610cd157600080fd5b919050565b600060208284031215610ce857600080fd5b6102f182610cba565b60008060408385031215610d0457600080fd5b610d0d83610cba565b946020939093013593505050565b60008060008060808587031215610d3157600080fd5b610d3a85610cba565b966020860135965060408601359560600135945092505050565b60008060408385031215610d6757600080fd5b50508035926020909101359150565b60008083601f840112610d8857600080fd5b50813567ffffffffffffffff811115610da057600080fd5b6020830191508360208260051b8501011115610dbb57600080fd5b9250929050565b60008060208385031215610dd557600080fd5b823567ffffffffffffffff811115610dec57600080fd5b610df885828601610d76565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610e5957603f19888603018452610e47858351610c36565b94509285019290850190600101610e2b565b5092979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715610e9f57610e9f610e66565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610ece57610ece610e66565b604052919050565b60006020808385031215610ee957600080fd5b823567ffffffffffffffff80821115610f0157600080fd5b9084019060808287031215610f1557600080fd5b610f1d610e7c565b82358152838301358015158114610f3357600080fd5b8185015260408381013590820152606083013582811115610f5357600080fd5b80840193505086601f840112610f6857600080fd5b823582811115610f7a57610f7a610e66565b610f8c601f8201601f19168601610ea5565b92508083528785828601011115610fa257600080fd5b80858501868501376000908301909401939093526060830152509392505050565b600080600060408486031215610fd857600080fd5b610fe184610cba565b9250602084013567ffffffffffffffff811115610ffd57600080fd5b61100986828701610d76565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b8181101561104e57835183529284019291840191600101611032565b50909695505050505050565b6020808252601d908201527f4f776e61626c653a2073656e646572206d757374206265206f776e6572000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761025f5761025f611091565b600181811c908216806110d257607f821691505b6020821081036110f257634e487b7160e01b600052602260045260246000fd5b50919050565b8181038181111561025f5761025f611091565b8082018082111561025f5761025f611091565b634e487b7160e01b600052603260045260246000fd5b601f82111561117e57600081815260208120601f850160051c8101602086101561115b5750805b601f850160051c820191505b8181101561117a57828155600101611167565b5050505b505050565b815167ffffffffffffffff81111561119d5761119d610e66565b6111b1816111ab84546110be565b84611134565b602080601f8311600181146111e657600084156111ce5750858301515b600019600386901b1c1916600185901b17855561117a565b600085815260208120601f198616915b82811015611215578886015182559484019460019091019084016111f6565b50858210156112335787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001820161125557611255611091565b506001019056fe7133055fb8f4facbf0f7ec5a7a08fe58dfc2981bda3880be393d767cd1228d52a2646970667358221220bfee3c01b767c0727160df76c81ac835db0f16b07bdc97163a87f4ec91536b0f64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.