Overview
MATIC Balance
0 MATIC
MATIC Value
$0.00More Info
Private Name Tags
ContractCreator:
TokenTracker
Sponsored
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 40195604 | 384 days ago | IN | Create: NativasAdapter | 0 MATIC | 0.05994345 |
Loading...
Loading
Contract Name:
NativasAdapter
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Standard Json-Input format)
/// SPDX-License-Identifier: MIT /// @by: Nativas ClimaTech /// @author: Juan Pablo Crespi pragma solidity ^0.8.0; import "Context.sol"; import "ERC165.sol"; import "Initializable.sol"; import "IERC20.sol"; import "IERC20Metadata.sol"; import "IERC1155ERC20.sol"; import "IERC20Adapter.sol"; /** * @title ERC20 inplementation that adds backward compatibility */ contract NativasAdapter is Context, Initializable, ERC165, IERC20, IERC20Adapter, IERC20Metadata { // IERC1155ERC20 IERC1155ERC20 internal _entity; // Token indentifier uint256 internal _tokenId; // Token name string internal _name; // Token symbol string internal _symbol; // Token decimals uint8 internal _decimals; /** * @dev See {NativasAdapter-init} */ constructor( uint256 tokenId_, string memory name_, string memory symbol_, uint8 decimals_ ) { init(tokenId_, name_, symbol_, decimals_); } /** * @dev Initialize contract */ function init( uint256 tokenId_, string memory name_, string memory symbol_, uint8 decimals_ ) public override initializer { _entity = IERC1155ERC20(_msgSender()); _tokenId = tokenId_; _name = name_; _symbol = symbol_; _decimals = decimals_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { return interfaceId == type(IERC20).interfaceId || interfaceId == type(IERC20Adapter).interfaceId || interfaceId == type(IERC20Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev ERC1155 token address. */ function entity() public view virtual returns (address) { return address(_entity); } /** * @dev ERC1155 token indentifier. */ function id() public view virtual returns (uint256) { return _tokenId; } /** * @dev See {IERC20-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC20-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC20-decimals}. */ function decimals() public view virtual override returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _entity.totalSupply(_tokenId); } /** * @dev See {IERC20-balanceOf}. */ function balanceOf( address account ) public view virtual override returns (uint256) { return _entity.balanceOf(account, _tokenId); } /** * @dev See {IERC20-allowance}. */ function allowance( address, address ) public view virtual override returns (uint256) { return 0; } /** * @dev See {IERC20-approve}. */ function approve(address, uint256) public virtual override returns (bool) { require(false, "NativasAdapter: method not allowed"); return false; } /** * @dev See {IERC20-transfer}. */ function transfer( address to, uint256 amount ) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-transferFrom}. */ function transferFrom( address, address, uint256 ) public virtual override returns (bool) { require(false, "NativasAdapter: method not allowed"); return false; } /** * @dev See {IERC1155ERC20-safeAdapterTransferFrom} */ function _transfer( address from, address to, uint256 amount ) internal virtual { _entity.safeAdapterTransferFrom(from, to, _tokenId, amount, ""); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "Address.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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/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 /// @by: Nativas ClimaTech /// @author: Juan Pablo Crespi pragma solidity ^0.8.0; import "IERC1155.sol"; import "IERC1155Supplyable.sol"; /** * @title Extension of ERC1155 that adds backward compatibility */ interface IERC1155ERC20 is IERC1155, IERC1155Supplyable { /** * @dev See {IERC1155-safeTransferFrom}. */ function safeAdapterTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
/// SPDX-License-Identifier: MIT /// @by: Nativas ClimaTech /// @author: Juan Pablo Crespi pragma solidity ^0.8.0; /** * @title Extension of ERC1155 that adds tracking of total supply per id. */ interface IERC1155Supplyable { /** * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ function totalSupply(uint256 tokenId) external view returns (uint256 totalSupply); }
/// SPDX-License-Identifier: MIT /// @by: Nativas ClimaTech /// @author: Juan Pablo Crespi pragma solidity ^0.8.0; /** * @dev Interface for the adapter functions from the ERC20 standard. */ interface IERC20Adapter { /** * @dev Initialize ERC20 contract */ function init( uint256 tokenId_, string memory name_, string memory symbol_, uint8 decimals_ ) external; }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "NativasAdapter.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"}],"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":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","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":[],"name":"entity","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"id","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162000ef738038062000ef7833981016040819052620000349162000296565b62000042848484846200004c565b505050506200047f565b600054610100900460ff16158080156200006d5750600054600160ff909116105b806200009d57506200008a30620001c260201b620005b61760201c565b1580156200009d575060005460ff166001145b620001055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805460ff19166001179055801562000129576000805461ff0019166101001790555b6000805462010000600160b01b03191662010000330217905560018590556002620001558582620003b3565b506003620001648482620003b3565b506004805460ff191660ff84161790558015620001bb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b03163b151590565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001f957600080fd5b81516001600160401b0380821115620002165762000216620001d1565b604051601f8301601f19908116603f01168101908282118183101715620002415762000241620001d1565b816040528381526020925086838588010111156200025e57600080fd5b600091505b8382101562000282578582018301518183018401529082019062000263565b600093810190920192909252949350505050565b60008060008060808587031215620002ad57600080fd5b845160208601519094506001600160401b0380821115620002cd57600080fd5b620002db88838901620001e7565b94506040870151915080821115620002f257600080fd5b506200030187828801620001e7565b925050606085015160ff811681146200031957600080fd5b939692955090935050565b600181811c908216806200033957607f821691505b6020821081036200035a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003ae57600081815260208120601f850160051c81016020861015620003895750805b601f850160051c820191505b81811015620003aa5782815560010162000395565b5050505b505050565b81516001600160401b03811115620003cf57620003cf620001d1565b620003e781620003e0845462000324565b8462000360565b602080601f8311600181146200041f5760008415620004065750858301515b600019600386901b1c1916600185901b178555620003aa565b600085815260208120601f198616915b8281101562000450578886015182559484019460019091019084016200042f565b50858210156200046f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610a68806200048f6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063313ce5671161008c57806395d89b411161006657806395d89b41146101af578063a9059cbb146101b7578063af640d0f146101ca578063dd62ed3e146101d257600080fd5b8063313ce5671461015d5780636cdbbc661461017257806370a082311461019c57600080fd5b806301ffc9a7146100d457806306fdde03146100fc578063095ea7b31461011157806315194a9f1461012457806318160ddd1461013957806323b872dd1461014f575b600080fd5b6100e76100e2366004610658565b6101e8565b60405190151581526020015b60405180910390f35b610104610255565b6040516100f39190610689565b6100e761011f3660046106f3565b6102e7565b6101376101323660046107c0565b610342565b005b610141610496565b6040519081526020016100f3565b6100e761011f366004610846565b60045460405160ff90911681526020016100f3565b6000546201000090046001600160a01b03166040516001600160a01b0390911681526020016100f3565b6101416101aa366004610882565b610512565b61010461058f565b6100e76101c53660046106f3565b61059e565b600154610141565b6101416101e036600461089d565b600092915050565b60006001600160e01b031982166336372b0760e01b148061021957506001600160e01b031982166315194a9f60e01b145b8061023457506001600160e01b0319821663a219a02560e01b145b8061024f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060028054610264906108d0565b80601f0160208091040260200160405190810160405280929190818152602001828054610290906108d0565b80156102dd5780601f106102b2576101008083540402835291602001916102dd565b820191906000526020600020905b8154815290600101906020018083116102c057829003601f168201915b5050505050905090565b60405162461bcd60e51b815260206004820152602260248201527f4e617469766173416461707465723a206d6574686f64206e6f7420616c6c6f77604482015261195960f21b60648201526000906084015b60405180910390fd5b600054610100900460ff16158080156103625750600054600160ff909116105b8061037c5750303b15801561037c575060005460ff166001145b6103df5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610339565b6000805460ff191660011790558015610402576000805461ff0019166101001790555b6000805462010000600160b01b0319166201000033021790556001859055600261042c8582610959565b5060036104398482610959565b506004805460ff191660ff8416179055801561048f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000805460015460405163bd85b03960e01b81526004810191909152620100009091046001600160a01b03169063bd85b03990602401602060405180830381865afa1580156104e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050d9190610a19565b905090565b60008054600154604051627eeac760e11b81526001600160a01b038581166004830152602482019290925262010000909204169062fdd58e90604401602060405180830381865afa15801561056b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024f9190610a19565b606060038054610264906108d0565b6000336105ac8185856105c5565b5060019392505050565b6001600160a01b03163b151590565b6000805460015460405163b3d05e4960e01b81526001600160a01b038781166004830152868116602483015260448201929092526064810185905260a0608482015260a481019390935262010000909104169063b3d05e499060c401600060405180830381600087803b15801561063b57600080fd5b505af115801561064f573d6000803e3d6000fd5b50505050505050565b60006020828403121561066a57600080fd5b81356001600160e01b03198116811461068257600080fd5b9392505050565b600060208083528351808285015260005b818110156106b65785810183015185820160400152820161069a565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146106ee57600080fd5b919050565b6000806040838503121561070657600080fd5b61070f836106d7565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261074457600080fd5b813567ffffffffffffffff8082111561075f5761075f61071d565b604051601f8301601f19908116603f011681019082821181831017156107875761078761071d565b816040528381528660208588010111156107a057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080608085870312156107d657600080fd5b84359350602085013567ffffffffffffffff808211156107f557600080fd5b61080188838901610733565b9450604087013591508082111561081757600080fd5b5061082487828801610733565b925050606085013560ff8116811461083b57600080fd5b939692955090935050565b60008060006060848603121561085b57600080fd5b610864846106d7565b9250610872602085016106d7565b9150604084013590509250925092565b60006020828403121561089457600080fd5b610682826106d7565b600080604083850312156108b057600080fd5b6108b9836106d7565b91506108c7602084016106d7565b90509250929050565b600181811c908216806108e457607f821691505b60208210810361090457634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561095457600081815260208120601f850160051c810160208610156109315750805b601f850160051c820191505b818110156109505782815560010161093d565b5050505b505050565b815167ffffffffffffffff8111156109735761097361071d565b6109878161098184546108d0565b8461090a565b602080601f8311600181146109bc57600084156109a45750858301515b600019600386901b1c1916600185901b178555610950565b600085815260208120601f198616915b828110156109eb578886015182559484019460019091019084016109cc565b5085821015610a095787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215610a2b57600080fd5b505191905056fea26469706673582212207afc3c013fa9bf0d4e4a45768771ecf77cc4c8c7398aaa772340a867938d29da64736f6c634300081100330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4e61746976617354656d706c617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e54300000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063313ce5671161008c57806395d89b411161006657806395d89b41146101af578063a9059cbb146101b7578063af640d0f146101ca578063dd62ed3e146101d257600080fd5b8063313ce5671461015d5780636cdbbc661461017257806370a082311461019c57600080fd5b806301ffc9a7146100d457806306fdde03146100fc578063095ea7b31461011157806315194a9f1461012457806318160ddd1461013957806323b872dd1461014f575b600080fd5b6100e76100e2366004610658565b6101e8565b60405190151581526020015b60405180910390f35b610104610255565b6040516100f39190610689565b6100e761011f3660046106f3565b6102e7565b6101376101323660046107c0565b610342565b005b610141610496565b6040519081526020016100f3565b6100e761011f366004610846565b60045460405160ff90911681526020016100f3565b6000546201000090046001600160a01b03166040516001600160a01b0390911681526020016100f3565b6101416101aa366004610882565b610512565b61010461058f565b6100e76101c53660046106f3565b61059e565b600154610141565b6101416101e036600461089d565b600092915050565b60006001600160e01b031982166336372b0760e01b148061021957506001600160e01b031982166315194a9f60e01b145b8061023457506001600160e01b0319821663a219a02560e01b145b8061024f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060028054610264906108d0565b80601f0160208091040260200160405190810160405280929190818152602001828054610290906108d0565b80156102dd5780601f106102b2576101008083540402835291602001916102dd565b820191906000526020600020905b8154815290600101906020018083116102c057829003601f168201915b5050505050905090565b60405162461bcd60e51b815260206004820152602260248201527f4e617469766173416461707465723a206d6574686f64206e6f7420616c6c6f77604482015261195960f21b60648201526000906084015b60405180910390fd5b600054610100900460ff16158080156103625750600054600160ff909116105b8061037c5750303b15801561037c575060005460ff166001145b6103df5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610339565b6000805460ff191660011790558015610402576000805461ff0019166101001790555b6000805462010000600160b01b0319166201000033021790556001859055600261042c8582610959565b5060036104398482610959565b506004805460ff191660ff8416179055801561048f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000805460015460405163bd85b03960e01b81526004810191909152620100009091046001600160a01b03169063bd85b03990602401602060405180830381865afa1580156104e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050d9190610a19565b905090565b60008054600154604051627eeac760e11b81526001600160a01b038581166004830152602482019290925262010000909204169062fdd58e90604401602060405180830381865afa15801561056b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024f9190610a19565b606060038054610264906108d0565b6000336105ac8185856105c5565b5060019392505050565b6001600160a01b03163b151590565b6000805460015460405163b3d05e4960e01b81526001600160a01b038781166004830152868116602483015260448201929092526064810185905260a0608482015260a481019390935262010000909104169063b3d05e499060c401600060405180830381600087803b15801561063b57600080fd5b505af115801561064f573d6000803e3d6000fd5b50505050505050565b60006020828403121561066a57600080fd5b81356001600160e01b03198116811461068257600080fd5b9392505050565b600060208083528351808285015260005b818110156106b65785810183015185820160400152820161069a565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146106ee57600080fd5b919050565b6000806040838503121561070657600080fd5b61070f836106d7565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261074457600080fd5b813567ffffffffffffffff8082111561075f5761075f61071d565b604051601f8301601f19908116603f011681019082821181831017156107875761078761071d565b816040528381528660208588010111156107a057600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080608085870312156107d657600080fd5b84359350602085013567ffffffffffffffff808211156107f557600080fd5b61080188838901610733565b9450604087013591508082111561081757600080fd5b5061082487828801610733565b925050606085013560ff8116811461083b57600080fd5b939692955090935050565b60008060006060848603121561085b57600080fd5b610864846106d7565b9250610872602085016106d7565b9150604084013590509250925092565b60006020828403121561089457600080fd5b610682826106d7565b600080604083850312156108b057600080fd5b6108b9836106d7565b91506108c7602084016106d7565b90509250929050565b600181811c908216806108e457607f821691505b60208210810361090457634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561095457600081815260208120601f850160051c810160208610156109315750805b601f850160051c820191505b818110156109505782815560010161093d565b5050505b505050565b815167ffffffffffffffff8111156109735761097361071d565b6109878161098184546108d0565b8461090a565b602080601f8311600181146109bc57600084156109a45750858301515b600019600386901b1c1916600185901b178555610950565b600085815260208120601f198616915b828110156109eb578886015182559484019460019091019084016109cc565b5085821015610a095787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215610a2b57600080fd5b505191905056fea26469706673582212207afc3c013fa9bf0d4e4a45768771ecf77cc4c8c7398aaa772340a867938d29da64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4e61746976617354656d706c617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e54300000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : tokenId_ (uint256): 0
Arg [1] : name_ (string): NativasTemplate
Arg [2] : symbol_ (string): NT0
Arg [3] : decimals_ (uint8): 0
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [5] : 4e61746976617354656d706c6174650000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [7] : 4e54300000000000000000000000000000000000000000000000000000000000
Loading...
Loading
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.