ERC-20
Overview
Max Total Supply
5,000 HUB
Holders
686
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.000000000000000009 HUBValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ERC20Relayer
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/** * @title ERC20Relayer * @author [email protected] * @notice ERC741 token standard, ERC20 & ERC721 synthetic token standard. * Because it follows the logical rules of how it inherently works, it can take advantage of existing indexers. * email: [email protected] * website: https://erc-hub.com * github: https://github.com/erc-hub/ERC741 * twitter: https://twitter.com/ERC_Hub * telegram: https://t.me/ERC_Hub */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.21; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "./ISemiFungibleERC741.sol"; contract ERC20Relayer is IERC20, IERC20Metadata, Context { ISemiFungibleERC741 public erc741; modifier onlyNFT() { require( _msgSender() == address(erc741), "onlyNFT can call this function" ); _; } constructor() { erc741 = ISemiFungibleERC741(_msgSender()); } function name() external view override returns (string memory) { return erc741.name(); } function symbol() external view override returns (string memory) { return erc741.symbol(); } function decimals() external view override returns (uint8) { return erc741._decimals(); } function totalSupply() external view override returns (uint256) { return erc741._erc20Supply(); } function balanceOf( address account ) external view override returns (uint256) { return erc741.balanceOfERC20(account); } function transfer( address to, uint256 amount ) external override returns (bool) { bool status = erc741.transferERC20(_msgSender(), to, amount); emit Transfer(_msgSender(), to, amount); return status; } function allowance( address owner, address spender ) external view override returns (uint256) { return erc741.allowance(owner, spender); } function approve( address spender, uint256 amount ) external override returns (bool) { bool status = erc741.approveERC20(_msgSender(), spender, amount); emit Approval(_msgSender(), spender, amount); return status; } function transferFrom( address from, address to, uint256 amount ) external override returns (bool) { bool status = erc741.transferFromERC20(_msgSender(), from, to, amount); emit Transfer(from, to, amount); return status; } function emitTransfer( address from, address to, uint256 amount ) external onlyNFT { emit Transfer(from, to, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.21; interface ISemiFungibleERC741 { function allowance(address, address) external view returns (uint256); function approve( address spender, uint256 amountOrId ) external returns (bool); function balanceOf(address) external view returns (uint256); function balanceOfERC20(address) external view returns (uint256); function baseTokenURI() external view returns (string memory); function _decimals() external view returns (uint8); function erc721totalSupply() external view returns (uint256); function getApproved(uint256) external view returns (address); function getBurnedToken() external view returns (uint256[] memory); function isApprovedForAll(address, address) external view returns (bool); function maxMintedId() external view returns (uint256); function name() external view returns (string memory); function owner() external view returns (address); function ownerOf(uint256 id) external view returns (address owner); function renounceOwnership() external; function safeTransferFrom(address from, address to, uint256 id) external; function safeTransferFrom( address from, address to, uint256 id, bytes memory data ) external; function setApprovalForAll(address operator, bool approved) external; function setTokenURI(string memory _tokenURI) external; function setWhitelist(address target, bool state) external; function symbol() external view returns (string memory); function tokenIdPool(uint256) external view returns (uint256); function tokenURI(uint256 id) external returns (string memory); function _erc20Supply() external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amountOrId ) external; function transferOwnership(address newOwner) external; function whitelist(address) external view returns (bool); function transferERC20( address sender, address to, uint256 amount ) external returns (bool); function transferFromERC20( address sender, address from, address to, uint256 amount ) external returns (bool); function approveERC20( address sender, address spender, uint256 amountOrId ) external returns (bool); }
{ "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
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emitTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"erc741","outputs":[{"internalType":"contract ISemiFungibleERC741","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561000f575f80fd5b505f80546001600160a01b031916331781556109ef90819061003090395ff3fe608060405234801561000f575f80fd5b50600436106100a6575f3560e01c8063313ce5671161006e578063313ce5671461012957806370a082311461014357806395d89b4114610156578063a9059cbb1461015e578063dd62ed3e14610171578063f798bb0014610184575f80fd5b806306fdde03146100aa578063095ea7b3146100c857806318160ddd146100eb57806323b872dd1461010157806323de665114610114575b5f80fd5b6100b26101ae565b6040516100bf91906107af565b60405180910390f35b6100db6100d63660046107fc565b610220565b60405190151581526020016100bf565b6100f3610300565b6040519081526020016100bf565b6100db61010f366004610824565b610374565b610127610122366004610824565b61045d565b005b610131610515565b60405160ff90911681526020016100bf565b6100f361015136600461085d565b610589565b6100b26105fb565b6100db61016c3660046107fc565b610641565b6100f361017f366004610876565b610712565b5f54610196906001600160a01b031681565b6040516001600160a01b0390911681526020016100bf565b5f8054604080516306fdde0360e01b815290516060936001600160a01b03909316926306fdde0392600480820193918290030181865afa1580156101f4573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261021b91908101906108bb565b905090565b5f805481906001600160a01b031663a8e5e4aa336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529087166024820152604481018690526064016020604051808303815f875af1158015610286573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102aa9190610963565b90506001600160a01b038416336001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516102f191815260200190565b60405180910390a39392505050565b5f805f9054906101000a90046001600160a01b03166001600160a01b0316636d502f526040518163ffffffff1660e01b8152600401602060405180830381865afa158015610350573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061021b9190610982565b5f805481906001600160a01b031663dd71105d336040516001600160e01b031960e084901b1681526001600160a01b03918216600482015281891660248201529087166044820152606481018690526084016020604051808303815f875af11580156103e2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104069190610963565b9050836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161044d91815260200190565b60405180910390a3949350505050565b5f546001600160a01b0316336001600160a01b0316146104c35760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c794e46542063616e2063616c6c20746869732066756e6374696f6e0000604482015260640160405180910390fd5b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161050891815260200190565b60405180910390a3505050565b5f805f9054906101000a90046001600160a01b03166001600160a01b03166332424aa36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610565573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061021b9190610999565b5f805460405163d93db24f60e01b81526001600160a01b0384811660048301529091169063d93db24f90602401602060405180830381865afa1580156105d1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105f59190610982565b92915050565b5f8054604080516395d89b4160e01b815290516060936001600160a01b03909316926395d89b4192600480820193918290030181865afa1580156101f4573d5f803e3d5ffd5b5f805481906001600160a01b0316639db5dbe4336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529087166024820152604481018690526064016020604051808303815f875af11580156106a7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106cb9190610963565b90506001600160a01b038416336001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516102f191815260200190565b5f8054604051636eb1769f60e11b81526001600160a01b03858116600483015284811660248301529091169063dd62ed3e90604401602060405180830381865afa158015610762573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107869190610982565b9392505050565b5f5b838110156107a757818101518382015260200161078f565b50505f910152565b602081525f82518060208401526107cd81604085016020870161078d565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146107f7575f80fd5b919050565b5f806040838503121561080d575f80fd5b610816836107e1565b946020939093013593505050565b5f805f60608486031215610836575f80fd5b61083f846107e1565b925061084d602085016107e1565b9150604084013590509250925092565b5f6020828403121561086d575f80fd5b610786826107e1565b5f8060408385031215610887575f80fd5b610890836107e1565b915061089e602084016107e1565b90509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f602082840312156108cb575f80fd5b815167ffffffffffffffff808211156108e2575f80fd5b818401915084601f8301126108f5575f80fd5b815181811115610907576109076108a7565b604051601f8201601f19908116603f0116810190838211818310171561092f5761092f6108a7565b81604052828152876020848701011115610947575f80fd5b61095883602083016020880161078d565b979650505050505050565b5f60208284031215610973575f80fd5b81518015158114610786575f80fd5b5f60208284031215610992575f80fd5b5051919050565b5f602082840312156109a9575f80fd5b815160ff81168114610786575f80fdfea264697066735822122014830b80c882d1b035d00eed9255a1de332d53484153aa0c6e3c76b627a0b06064736f6c63430008150033
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106100a6575f3560e01c8063313ce5671161006e578063313ce5671461012957806370a082311461014357806395d89b4114610156578063a9059cbb1461015e578063dd62ed3e14610171578063f798bb0014610184575f80fd5b806306fdde03146100aa578063095ea7b3146100c857806318160ddd146100eb57806323b872dd1461010157806323de665114610114575b5f80fd5b6100b26101ae565b6040516100bf91906107af565b60405180910390f35b6100db6100d63660046107fc565b610220565b60405190151581526020016100bf565b6100f3610300565b6040519081526020016100bf565b6100db61010f366004610824565b610374565b610127610122366004610824565b61045d565b005b610131610515565b60405160ff90911681526020016100bf565b6100f361015136600461085d565b610589565b6100b26105fb565b6100db61016c3660046107fc565b610641565b6100f361017f366004610876565b610712565b5f54610196906001600160a01b031681565b6040516001600160a01b0390911681526020016100bf565b5f8054604080516306fdde0360e01b815290516060936001600160a01b03909316926306fdde0392600480820193918290030181865afa1580156101f4573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261021b91908101906108bb565b905090565b5f805481906001600160a01b031663a8e5e4aa336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529087166024820152604481018690526064016020604051808303815f875af1158015610286573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102aa9190610963565b90506001600160a01b038416336001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516102f191815260200190565b60405180910390a39392505050565b5f805f9054906101000a90046001600160a01b03166001600160a01b0316636d502f526040518163ffffffff1660e01b8152600401602060405180830381865afa158015610350573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061021b9190610982565b5f805481906001600160a01b031663dd71105d336040516001600160e01b031960e084901b1681526001600160a01b03918216600482015281891660248201529087166044820152606481018690526084016020604051808303815f875af11580156103e2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104069190610963565b9050836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161044d91815260200190565b60405180910390a3949350505050565b5f546001600160a01b0316336001600160a01b0316146104c35760405162461bcd60e51b815260206004820152601e60248201527f6f6e6c794e46542063616e2063616c6c20746869732066756e6374696f6e0000604482015260640160405180910390fd5b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161050891815260200190565b60405180910390a3505050565b5f805f9054906101000a90046001600160a01b03166001600160a01b03166332424aa36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610565573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061021b9190610999565b5f805460405163d93db24f60e01b81526001600160a01b0384811660048301529091169063d93db24f90602401602060405180830381865afa1580156105d1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105f59190610982565b92915050565b5f8054604080516395d89b4160e01b815290516060936001600160a01b03909316926395d89b4192600480820193918290030181865afa1580156101f4573d5f803e3d5ffd5b5f805481906001600160a01b0316639db5dbe4336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529087166024820152604481018690526064016020604051808303815f875af11580156106a7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106cb9190610963565b90506001600160a01b038416336001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516102f191815260200190565b5f8054604051636eb1769f60e11b81526001600160a01b03858116600483015284811660248301529091169063dd62ed3e90604401602060405180830381865afa158015610762573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107869190610982565b9392505050565b5f5b838110156107a757818101518382015260200161078f565b50505f910152565b602081525f82518060208401526107cd81604085016020870161078d565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146107f7575f80fd5b919050565b5f806040838503121561080d575f80fd5b610816836107e1565b946020939093013593505050565b5f805f60608486031215610836575f80fd5b61083f846107e1565b925061084d602085016107e1565b9150604084013590509250925092565b5f6020828403121561086d575f80fd5b610786826107e1565b5f8060408385031215610887575f80fd5b610890836107e1565b915061089e602084016107e1565b90509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f602082840312156108cb575f80fd5b815167ffffffffffffffff808211156108e2575f80fd5b818401915084601f8301126108f5575f80fd5b815181811115610907576109076108a7565b604051601f8201601f19908116603f0116810190838211818310171561092f5761092f6108a7565b81604052828152876020848701011115610947575f80fd5b61095883602083016020880161078d565b979650505050505050565b5f60208284031215610973575f80fd5b81518015158114610786575f80fd5b5f60208284031215610992575f80fd5b5051919050565b5f602082840312156109a9575f80fd5b815160ff81168114610786575f80fdfea264697066735822122014830b80c882d1b035d00eed9255a1de332d53484153aa0c6e3c76b627a0b06064736f6c63430008150033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.