Contract 0x9e797cc1581660c22a1c7c203086a489bfe7f70c

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0x55d481fc059d16293111a4dcc64e1fe9d263c1525f8e86665d0d488d85accd6fOffset433713912023-05-31 14:42:244 days 8 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.039943456517195.274781311
0x30de51514d6b1768049b881d375935d2f1d05d44b1b61744097f379fdf851020Safe Transfer Fr...425432302023-05-10 18:08:0325 days 4 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.011625638076180.429874078
0xe84ea8ae05ccebb3427d99695af2f5a760725289cfefa11536d8af178ab52891Safe Transfer Fr...425426982023-05-10 17:49:0425 days 5 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.015691040575226.562521853
0xcb1fb9b34a679b398e0a52e0289797499774660409133a98497328cdb33bab4fOffset420689042023-04-28 19:16:5737 days 3 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.082390958573402.602340497
0x2eb2d5defb370b6509cd6f58b766132512e7a1cceb1ad11b9fdf9c8d3382302cSafe Transfer Fr...420688242023-04-28 19:14:0737 days 3 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.029191015603421.488305926
0x6469d54ae8cb44b32f09352521e7a1e37cc8d849f4253700a5295d47fd0e3baaOffset410956172023-04-03 12:53:3262 days 10 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.018320336486110.735704877
0x4fef7423fc004c8ed0c3f7e508a456571d249f1a7ef97e7c5399f511b94c43b1Offset410955642023-04-03 12:51:3862 days 10 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.024528936008119.979925889
0x3a108449a89dbcee40800fc850cf2f2cbd13af0c15e605c2b7fdb8337039b582Safe Transfer Fr...409488542023-03-30 18:38:2266 days 4 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.00440699748593.08263778
0x67966e400cfc7619cf139a9ec78ee12457f4d9d7d07d7fafe8813ee9d5d18debOffset409231832023-03-30 2:54:0366 days 20 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.021170543967133.98908854
0xb30302a23629cd3169bdd31514f36401d336778032830089996d9b943b367a12Offset409231742023-03-30 2:53:4566 days 20 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.021445466393135.708468185
0x30527a04cc4ea82d68793e789036b3ecc5f1fd356d1143c9b6d9902ada7926bcOffset409231622023-03-30 2:53:1966 days 20 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.025461472243121.649445508
0x48ef5639b94237d17863146bfe3c297b1e722b3f9b4b4f9e905fb52831bd8991Offset408355342023-03-27 19:20:2869 days 3 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.004237179923124.810154159
0x3858d1d3a21e3478fc3753f337585a793c28b76d9859aaf726e8e180d8bfdb4dOffset408355292023-03-27 19:20:1869 days 3 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.02394675917295.978609994
0xbc9b3a79d9ceca7cf9981b6604127ec734488c39f4ff683b50ecd673f242aacfSafe Transfer Fr...408353402023-03-27 19:13:0469 days 3 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.006709145807128.663262206
0x9a2bc614c13f2d040449085b300825a912bf9d2533109dd242eac452f6239370Safe Transfer Fr...408353332023-03-27 19:12:5069 days 3 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.006553363714125.6757832
0x81ea67ee399e07c18488283afe4a9ca34e3527ea3fdb0cdcfd2eeb8d589512d5Safe Transfer Fr...408353302023-03-27 19:12:4469 days 3 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.007435047476142.58409198
0xad56367a961bb8c26f2404426f48d7c36a559dcfb8ae75a7896a34869c57dae9Safe Transfer Fr...408353302023-03-27 19:12:4469 days 3 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.005272350813101.109422064
0x06fcdf45a08a4eeb7d5bdb465001028d7ba1acdccfb0ada586e199fd07933cc6Safe Transfer Fr...408353302023-03-27 19:12:4469 days 3 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.006563049424125.861528894
0x837bae8ca05044c68d28f1f1bb4bc3d30c8457657ccddf938a7235d5754209c8Safe Transfer Fr...408353302023-03-27 19:12:4469 days 3 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.00685936332999.059330336
0xd98d8803fa00eaa782483b025ceec974289774985726bfc3126eff52991a3b39Safe Transfer Fr...403879672023-03-15 21:40:0581 days 1 hr ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.004022474962.41717589
0x06b750bfc72fd46053c8ebbbec4ce8465c076b23cb01a5e245f55eb875b42ef5Safe Transfer Fr...403875192023-03-15 21:24:0481 days 1 hr ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.00420531028660.730887239
0x004f05004302c56ff1bb581f9bd8e7ac9d3872d59b7337218e82c31cfba7daa4Safe Transfer Fr...403874642023-03-15 21:22:0881 days 1 hr ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.00426686715661.619859291
0x20ce7857693c08b8b349c5fc2dcb99e6b9588f34e713ba8d3b9edfb64f5d3a74Offset403870802023-03-15 21:08:0581 days 1 hr ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.01501537549864.776729702
0xa2bac11a5cd391486c97771e3f204a193eb0274acfdd7d41839bf16965bdac0bSafe Transfer Fr...403868302023-03-15 20:59:1081 days 2 hrs ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.00435384327262.87592277
0xa6270455ccb3f9363714cbe73b88fe32a8ba597e5ad21686088c6aa300684e52Safe Transfer Fr...403500022023-03-14 21:31:0582 days 1 hr ago0xf1ee65817928b0a6e078215799acdadd1b0dd10f IN  0x9e797cc1581660c22a1c7c203086a489bfe7f70c0 MATIC0.009133715834131.881482518
[ Download CSV Export 
Latest 4 internal transactions
Parent Txn Hash Block From To Value
0x28bb68b8e508b51636e49029e7d15d30e20beffba1ec25cee2cfbbf0918517a2403120242023-03-13 21:28:4383 days 1 hr ago 0x9e797cc1581660c22a1c7c203086a489bfe7f70c  Contract Creation0 MATIC
0x620e9efc5c96f477e2dac3c43c7c1295dc318795a9cdae97dab03058aa848f5e403120242023-03-13 21:28:4383 days 1 hr ago 0x9e797cc1581660c22a1c7c203086a489bfe7f70c  Contract Creation0 MATIC
0xa89e99132a1c8035e06c303675c30ba85d837e5730b8ea40930496cb9c8c3496403119252023-03-13 21:25:1383 days 1 hr ago 0x9e797cc1581660c22a1c7c203086a489bfe7f70c  Contract Creation0 MATIC
0x113a6b3c30f56cf15858695484f08d4af3fcb2a04ff7d101b2c5ae4d3df964d1403119212023-03-13 21:25:0583 days 1 hr ago 0x9e797cc1581660c22a1c7c203086a489bfe7f70c  Contract Creation0 MATIC
[ Download CSV Export 
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
NativasToken

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
File 1 of 27 : NativasToken.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi

pragma solidity ^0.8.0;

import "IAccessControl.sol";
import "NativasRoles.sol";
import "Controllable.sol";
import "ERC1155Pausable.sol";
import "ERC1155Swappable.sol";
import "ERC1155Offsettable.sol";
import "ERC1155URIStorable.sol";
import "ERC1155ERC20.sol";

/**
 * @dev Nativas ERC1155 Contract
 */
contract NativasToken is
    Controllable,
    ERC1155Pausable,
    ERC1155Swappable,
    ERC1155URIStorable,
    ERC1155ERC20
{
    constructor(
        address controller_,
        string memory baseURI_,
        address template_,
        address logger_
    )
        Controllable(controller_)
        ERC1155URIStorable(baseURI_)
        ERC1155ERC20(template_)
        ERC1155Swappable(logger_)
    {}

    /**
     * @dev See {ERC1155URIStorable-uri}.
     */
    function uri(
        uint256 tokenId
    )
        public
        view
        virtual
        override(ERC1155, ERC1155URIStorable)
        returns (string memory)
    {
        return super.uri(tokenId);
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(
        uint256 tokenId
    )
        public
        view
        virtual
        override(ERC1155ERC20, ERC1155URIStorable)
        returns (bool)
    {
        return super.exists(tokenId);
    }

    /**
     * @dev Set token metadata
     */
    function setMetadata(
        uint256 tokenId,
        string memory name,
        string memory symbol,
        uint8 decimals,
        string memory tokenURI,
        bool offsettable
    ) public virtual {
        require(
            _hasRole(Roles.EDITOR_ROLE),
            "NativasToken: caller must have editor role to set metadata"
        );
        _setAdapter(tokenId, name, symbol, decimals);
        _setOffsettable(tokenId, offsettable);
        _setURI(tokenId, tokenURI);
    }

    /**
     * @dev See {Controllable-_transferControl}.
     *
     * Requirements:
     *
     * - the caller must be admin
     * - new controller must implement IAccessControl interface
     */
    function transferControl(address controller_) public virtual {
        require(
            _hasRole(Roles.ADMIN_ROLE),
            "NativasToken: caller must have admin role to tranfer control"
        );
        require(
            controller_ != address(0),
            "NativasToken: new controller is the zero address"
        );
        require(
            IERC165(controller_).supportsInterface(
                type(IAccessControl).interfaceId
            ),
            "NativasToken: new controller does not support IAccessControl interface"
        );
        _transferControl(controller_);
    }

    /**
     * @dev See {ERC1155Burnable-_safeBurn}.
     *
     * Requirements:
     *
     * - the caller must be burner.
     */
    function burn(
        address account,
        uint256 tokenId,
        uint256 amount
    ) public virtual {
        require(
            _isOwnerOrApproved(account),
            "NativasToken: caller is not token owner or approved"
        );
        _burn(account, tokenId, amount);
    }

    /**
     * @dev See {ERC1155Burnable-_safeBurnBatch}.
     *
     * Requirements:
     *
     * - the caller must be burner.
     */
    function burnBatch(
        address account,
        uint256[] memory tokenIds,
        uint256[] memory amounts
    ) public virtual {
        require(
            _isOwnerOrApproved(account),
            "NativasToken: caller is not token owner or approved"
        );
        _burnBatch(account, tokenIds, amounts);
    }

    /**
     * @dev See {ERC1155Mintable-_mint}.
     *
     * Requirements:
     *
     * - the caller must be minter.
     */
    function mint(
        address to,
        uint256 tokenId,
        uint256 amount,
        bytes memory data
    ) public virtual {
        require(
            _hasRole(Roles.MINTER_ROLE),
            "NativasToken: caller must have minter role to mint"
        );
        _mint(to, tokenId, amount, data);
    }

    /**
     * @dev See {ERC1155Mintable-_mintBatch}.
     *
     * Requirements:
     *
     * - the caller must be minter.
     */
    function mintBatch(
        address to,
        uint256[] memory tokenIds,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual {
        require(
            _hasRole(Roles.MINTER_ROLE),
            "NativasToken: caller must have minter role to mint"
        );
        _mintBatch(to, tokenIds, amounts, data);
    }

    /**
     * @dev See {ERC1155ERC20-_setAdapter}
     *
     * Requirements:
     *
     * - the caller must be editor.
     */
    function setAdapter(
        uint256 tokenId,
        string memory name,
        string memory symbol,
        uint8 decimals
    ) public virtual {
        require(
            _hasRole(Roles.EDITOR_ROLE),
            "NativasToken: caller must have editor role to set adapter"
        );
        _setAdapter(tokenId, name, symbol, decimals);
    }

    /**
     * @dev See {ERC1155ERC20-_setTemplate}
     *
     * Requirements:
     *
     * - the caller must be editor.
     */
    function setTemplate(address template_) public virtual {
        require(
            _hasRole(Roles.ADMIN_ROLE),
            "NativasToken: caller must have admin role to set template"
        );
        _setTemplate(template_);
    }

    /**
     * @dev See {Pausable-_pause}.
     *
     * Requirements:
     *
     * - the caller must be pauser.
     */
    function pause() public virtual {
        require(
            _hasRole(Roles.PAUSER_ROLE),
            "NativasToken: caller must have pauser role to pause"
        );
        _pause();
    }

    /**
     * @dev See {Pausable-_unpause}.
     *
     * Requirements:
     *
     * - the caller must be pauser.
     */
    function unpause() public virtual {
        require(
            _hasRole(Roles.PAUSER_ROLE),
            "NativasToken: caller must have pauser role to unpause"
        );
        _unpause();
    }

    /**
     * @dev See {ERC1155URIStorable-_setBaseURI}
     *
     * Requeriments:
     *
     * - the caller must be editor
     */
    function setBaseURI(string memory baseURI) public virtual {
        require(
            _hasRole(Roles.EDITOR_ROLE),
            "NativasToken: caller must have editor role to set base uri"
        );
        _setBaseURI(baseURI);
    }

    /**
     * @dev See {ERC1155URIStorable-_setURI}
     *
     * Requeriments:
     *
     * - the caller must be editor.
     */
    function setURI(uint256 tokenId, string memory tokenURI) public virtual {
        require(
            _hasRole(Roles.EDITOR_ROLE),
            "NativasToken: caller must have editor role to set uri"
        );
        _setURI(tokenId, tokenURI);
    }

    /**
     * @dev See {ERC1155Offsetter-_setOffsettable}
     *
     * Requeriments:
     *
     * - the caller must be editor
     */
    function setOffsettable(uint256 tokenId, bool enabled) public virtual {
        require(
            _hasRole(Roles.EDITOR_ROLE),
            "NativasToken: caller must have editor role to set offsettable"
        );
        _setOffsettable(tokenId, enabled);
    }

    /**
     * @dev See {ERC1155ERC20-_updateLogger}
     *
     * Requirements:
     *
     * - the caller must be editor.
     */
    function setLogger(address logger_) public virtual {
        require(
            _hasRole(Roles.ADMIN_ROLE),
            "NativasToken: caller must have admin role to set logger"
        );
        _setLogger(logger_);
    }

    /**
     * @dev See {ERC1155Offsetter-_swap}
     *
     * Requeriments:
     *
     * - the caller must be offsetter
     */
    function swap(
        address account,
        uint256 fromTokenId,
        uint256 toTokenId,
        uint256 amount,
        bytes memory data
    ) public virtual {
        require(
            _hasRole(Roles.SWAPPER_ROLE),
            "NativasToken: caller must have swapper role to swap"
        );
        _swap(account, fromTokenId, toTokenId, amount, data);
    }

    /**
     * @dev See {ERC1155Offsetter-_swapBatch}
     *
     * Requeriments:
     *
     * - the caller must be offsetter
     */
    function swapBatch(
        address account,
        uint256[] memory fromTokenIds,
        uint256[] memory toTokenIds,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual {
        require(
            _hasRole(Roles.SWAPPER_ROLE),
            "NativasToken: caller must have swapper role to swap"
        );
        _swapBatch(account, fromTokenIds, toTokenIds, amounts, data);
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory tokenIds,
        uint256[] memory amounts,
        bytes memory data
    )
        internal
        virtual
        override(ERC1155, ERC1155ERC20, ERC1155Pausable, ERC1155URIStorable)
    {
        super._beforeTokenTransfer(operator, from, to, tokenIds, amounts, data);
    }

    /**
     * @dev See {IAccessControl-hasRole}
     */
    function _hasRole(bytes32 role) internal virtual returns (bool) {
        return IAccessControl(controller()).hasRole(role, _msgSender());
    }
}

File 2 of 27 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 3 of 27 : NativasRoles.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi

pragma solidity ^0.8.0;

library Roles {
    bytes32 public constant ADMIN_ROLE = 0x00;
    bytes32 public constant EDITOR_ROLE = keccak256("EDITOR_ROLE");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
    bytes32 public constant SWAPPER_ROLE = keccak256("SWAPPER_ROLE");
    bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE");
}

File 4 of 27 : Controllable.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi

pragma solidity ^0.8.0;

import "Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism.
 */
contract Controllable is Context {
    address private _controller;

    event ControlTransferred(
        address indexed oldController,
        address indexed newControllerr
    );

    /**
     * @dev Initializes the contract setting the deployer as the initial controller.
     */
    constructor(address controller_) {
        _transferControl(controller_);
    }

    /**
     * @dev Returns the address of the current controller.
     */
    function controller() public view virtual returns (address) {
        return _controller;
    }

    /**
     * @dev Transfers control of the contract to a new account (`controller_`).
     * Can only be called by the current controller.
     *
     * NOTE: Renouncing control will leave the contract without a controller,
     * thereby removing any functionality that is only available to the controller.
     */
    function _transferControl(address controller_) internal virtual {
        address current = _controller;
        _controller = controller_;
        emit ControlTransferred(current, controller_);
    }
}

File 5 of 27 : Context.sol
// 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;
    }
}

File 6 of 27 : ERC1155Pausable.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi

pragma solidity ^0.8.0;

import "Pausable.sol";
import "ERC1155Base.sol";

/**
 * @dev ERC1155 pause implementation
 */
contract ERC1155Pausable is ERC1155Base, Pausable {
    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory tokenIds,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, tokenIds, amounts, data);
        require(
            paused() == false,
            "ERC1155Pausable: token transfer while paused"
        );
    }
}

File 7 of 27 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 8 of 27 : ERC1155Base.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi
/// @dev https://eips.ethereum.org/EIPS/eip-1155

pragma solidity ^0.8.0;

import "ERC1155.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 */
contract ERC1155Base is ERC1155 {
    /**
     * @dev See {ERC1155-constructor}.
     */
    constructor() ERC1155("") {}

    /**
     * @dev See {ERC1155-isApprovedForAll}
     */
    function _isOwnerOrApproved(
        address account
    ) internal view virtual returns (bool) {
        return
            account == _msgSender() || isApprovedForAll(account, _msgSender());
    }
}

File 9 of 27 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "IERC1155.sol";
import "IERC1155Receiver.sol";
import "IERC1155MetadataURI.sol";
import "Address.sol";
import "Context.sol";
import "ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

    // Mapping from account to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC1155).interfaceId ||
            interfaceId == type(IERC1155MetadataURI).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: address zero is not a valid owner");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `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 memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - 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[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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 _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `ids` and `amounts` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 10 of 27 : IERC1155.sol
// 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;
}

File 11 of 27 : IERC165.sol
// 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);
}

File 12 of 27 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "IERC165.sol";

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 13 of 27 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 14 of 27 : Address.sol
// 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);
        }
    }
}

File 15 of 27 : ERC165.sol
// 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;
    }
}

File 16 of 27 : ERC1155Swappable.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi

pragma solidity ^0.8.0;

import "Strings.sol";
import "ERC1155Offsettable.sol";

/**
 * @dev Offset Implementation
 */
contract ERC1155Swappable is ERC1155Offsettable {
    /**
     * @dev See {ERC1155Offsettable-constructor}
     */
    constructor(address logger_) ERC1155Offsettable(logger_) {}

    function _swap(
        address account,
        uint256 fromTokenId,
        uint256 toTokenId,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(
            _offsettable[fromTokenId] == false,
            "ERC1155Swappable: token from must not be offsettable"
        );
        require(
            _offsettable[toTokenId] == true,
            "ERC1155Swappable: token to must be offsettable"
        );
        _burn(account, fromTokenId, amount);
        _mint(account, toTokenId, amount, data);
    }

    function _swapBatch(
        address account,
        uint256[] memory fromTokenIds,
        uint256[] memory toTokenIds,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        for (uint256 i = 0; i < fromTokenIds.length; i++) {
            require(
                _offsettable[fromTokenIds[i]] == false,
                "ERC1155Swappable: token from must not be offsettable"
            );
        }
        for (uint256 i = 0; i < toTokenIds.length; i++) {
            require(
                _offsettable[toTokenIds[i]] == true,
                "ERC1155Swappable: token to must be offsettable"
            );
        }
        _burnBatch(account, fromTokenIds, amounts);
        _mintBatch(account, toTokenIds, amounts, data);
    }
}

File 17 of 27 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed 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";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 18 of 27 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 19 of 27 : ERC1155Offsettable.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi

pragma solidity ^0.8.0;

import "Strings.sol";
import "IERC1155Logger.sol";
import "ERC1155Base.sol";

/**
 * @dev Offset Implementation
 */
contract ERC1155Offsettable is ERC1155Base {
    // Offset logger
    IERC1155Logger internal _logger;
    // Mapping token id to offsettable value
    mapping(uint256 => bool) internal _offsettable;

    /**
     * @dev Set IERC1155Logger implementation
     */
    constructor(address logger_) {
        _setLogger(logger_);
    }

    /**
     * @dev Get offset logger implementation address
     */
    function logger() public view virtual returns (address) {
        return address(_logger);
    }

    /**
     * @dev Get offsettable value by token id.
     */
    function offsettable(uint256 tokenId) public view virtual returns (bool) {
        return _offsettable[tokenId];
    }

    /**
     * @dev See {ERC1155Offsettable-_offset}.
     *
     * Requirements:
     *
     * - the caller must be owner or approved.
     */
    function offset(
        address account,
        uint256 tokenId,
        uint256 amount,
        string memory reason
    ) public virtual {
        require(
            _isOwnerOrApproved(account),
            "ERC1155Offsettable: caller is not token owner or approved"
        );
        _burn(account, tokenId, amount);
        _offset(account, tokenId, amount, reason);
    }

    /**
     * @dev See {ERC1155Offsettable-_offset}.
     *
     * Requirements:
     *
     * - the caller must be owner or approved.
     */
    function offsetBatch(
        address account,
        uint256[] memory tokenIds,
        uint256[] memory amounts,
        string[] memory reasons
    ) public virtual {
        require(
            _isOwnerOrApproved(account),
            "ERC1155Offsettable: caller is not token owner or approved"
        );
        _burnBatch(account, tokenIds, amounts);
        _offsetBatch(account, tokenIds, amounts, reasons);
    }

    /**
     * @dev Sets `enabled` as the offsettable value of `tokenId`.
     */
    function _setOffsettable(uint256 tokenId, bool enabled) internal virtual {
        _offsettable[tokenId] = enabled;
    }

    /**
     * @dev See {IERC1155Logger-offset}.
     */
    function _offsetBatch(
        address account,
        uint256[] memory tokenIds,
        uint256[] memory amounts,
        string[] memory reasons
    ) internal virtual {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            _offset(account, tokenIds[i], amounts[i], reasons[i]);
        }
    }

    /**
     * @dev See {IERC1155Logger-offset}.
     */
    function _offset(
        address account,
        uint256 tokenId,
        uint256 amount,
        string memory reason
    ) internal virtual {
        require(
            _offsettable[tokenId] == true,
            "ERC1155Offsettable: token must be offsettable"
        );
        _logger.offset(account, tokenId, amount, reason);
    }

    /**
     * @dev Sets the logger contract
     *
     * Requirements:
     *
     * - the template address must not be address 0.
     * - tem template contract must implemente the IERC1155Logger interface
     */
    function _setLogger(address logger_) internal virtual {
        require(
            logger_ != address(0),
            "ERC1155Offsettable: new logger is the zero address"
        );
        require(
            IERC165(logger_).supportsInterface(
                type(IERC1155Logger).interfaceId
            ),
            "ERC1155Offsettable: new template does not support IERC1155Logger interface"
        );
        _logger = IERC1155Logger(logger_);
    }
}

File 20 of 27 : IERC1155Logger.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi

pragma solidity ^0.8.0;

/**
 * @title
 */
interface IERC1155Logger {
    function offset(
        address account,
        uint256 tokenId,
        uint256 amount,
        string memory reason
    ) external;
}

File 21 of 27 : ERC1155URIStorable.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi

pragma solidity ^0.8.0;

import "Strings.sol";
import "ERC1155Base.sol";

/**
 * @dev ERC1155 token with storage based token URI management.
 */
contract ERC1155URIStorable is ERC1155Base {
    using Strings for uint256;
    // Used as the URI for all token types by relying on ID substitution.
    string private _baseURI;
    // Mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev set base uri
     */
    constructor(string memory baseURI_) {
        _setBaseURI(baseURI_);
    }

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the concatenation of the `_baseURI`
     * and the token-specific uri if the latter is set
     *
     */
    function uri(
        uint256 tokenId
    ) public view virtual override returns (string memory) {
        string memory tokenURI = _tokenURIs[tokenId];
        return
            bytes(tokenURI).length > 0
                ? string(abi.encodePacked(_baseURI, tokenURI))
                : super.uri(tokenId);
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 tokenId) public view virtual returns (bool) {
        string memory tokenURI = _tokenURIs[tokenId];
        return bytes(tokenURI).length > 0;
    }

    /**
     * @dev Sets `baseURI` as the `_baseURI` for all tokens
     */
    function _setBaseURI(string memory baseURI_) internal virtual {
        _baseURI = baseURI_;
    }

    /**
     * @dev Sets `tokenURI` as the tokenURI of `tokenId`.
     */
    function _setURI(uint256 tokenId, string memory tokenURI) internal virtual {
        _tokenURIs[tokenId] = tokenURI;
        emit URI(tokenURI, tokenId);
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory tokenIds,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, tokenIds, amounts, data);
        for (uint256 i = 0; i < tokenIds.length; ++i) {
            require(
                exists(tokenIds[i]),
                "ERC1155URIStorable: token uri does not exist"
            );
        }
    }
}

File 22 of 27 : ERC1155ERC20.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi

pragma solidity ^0.8.0;

import "Clones.sol";
import "IERC1155ERC20.sol";
import "IERC20Adapter.sol";
import "ERC1155Supplyable.sol";

/**
 *
 */
contract ERC1155ERC20 is ERC1155Supplyable, IERC1155ERC20 {
    using Clones for address;

    // NativasAdapter template
    address internal _template;
    // Mapping token id to adapter address
    mapping(uint256 => address) internal _adapters;

    /**
     * @dev MUST trigger when a new adapter is created.
     */
    event AdapterCreated(uint256 indexed tokenId, address indexed adapter);

    /**
     * @dev Set NativasAdapter contract template
     */
    constructor(address template_) {
        _setTemplate(template_);
    }

    /**
     * @dev Get NativasAdapter contract template
     */
    function template() public view virtual returns (address) {
        return _template;
    }

    /**
     * @dev Get adpter contract address for token id.
     */
    function getAdapter(uint256 tokenId) public view virtual returns (address) {
        return _adapters[tokenId];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(
        uint256 tokenId
    ) public view virtual override returns (bool) {
        return _adapters[tokenId] != address(0);
    }

    /**
     * @dev Perform tranfer from adapter contract.
     *
     * Requirements:
     *
     * - the caller MUST be the token adapter.
     */
    function safeAdapterTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            _msgSender() == _adapters[tokenId],
            "ERC1155ERC20: caller is not the token adapter"
        );
        _safeTransferFrom(from, to, tokenId, amount, data);
    }

    /**
     * @dev Create new adapter contract por token id
     */
    function _setAdapter(
        uint256 tokenId,
        string memory name,
        string memory symbol,
        uint8 decimals
    ) internal virtual {
        require(
            _template != address(0),
            "ERC1155ERC20: template is the zero address"
        );
        address adapter = _template.clone();
        IERC20Adapter(adapter).init(tokenId, name, symbol, decimals);
        _adapters[tokenId] = adapter;
        emit AdapterCreated(tokenId, adapter);
    }

    /**
     * @dev Sets the adapter template contracts
     *
     * Requirements:
     *
     * - the template address must not be address 0.
     * - tem template contract must implemente the IERC20Adapter interface
     */
    function _setTemplate(address template_) internal virtual {
        require(
            template_ != address(0),
            "ERC1155ERC20: new template is the zero address"
        );
        require(
            IERC165(template_).supportsInterface(
                type(IERC20Adapter).interfaceId
            ),
            "ERC1155ERC20: new template does not support IERC20Adapter interface"
        );
        _template = template_;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory tokenIds,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, tokenIds, amounts, data);
        for (uint256 i = 0; i < tokenIds.length; ++i) {
            require(
                exists(tokenIds[i]) == true,
                "ERC1155ERC20: token adapter does not exist"
            );
        }
    }
}

File 23 of 27 : Clones.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (proxy/Clones.sol)

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 * _Available since v3.4._
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create(0, 0x09, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create2(0, 0x09, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(add(ptr, 0x38), deployer)
            mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)
            mstore(add(ptr, 0x14), implementation)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)
            mstore(add(ptr, 0x58), salt)
            mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))
            predicted := keccak256(add(ptr, 0x43), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(address implementation, bytes32 salt)
        internal
        view
        returns (address predicted)
    {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

File 24 of 27 : IERC1155ERC20.sol
/// 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;
}

File 25 of 27 : IERC1155Supplyable.sol
/// 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);
}

File 26 of 27 : IERC20Adapter.sol
/// 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;
}

File 27 of 27 : ERC1155Supplyable.sol
/// SPDX-License-Identifier: MIT
/// @by: Nativas ClimaTech
/// @author: Juan Pablo Crespi

pragma solidity ^0.8.0;

import "IERC1155Supplyable.sol";
import "ERC1155Base.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 */
contract ERC1155Supplyable is ERC1155Base, IERC1155Supplyable {
    // total supply
    mapping(uint256 => uint256) internal _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(
        uint256 tokenId
    ) public view virtual override returns (uint256 supply) {
        return _totalSupply[tokenId];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 tokenId) public view virtual returns (bool) {
        return totalSupply(tokenId) > 0;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory tokenIds,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, tokenIds, amounts, data);
        //Mint
        if (from == address(0)) {
            for (uint256 i = 0; i < tokenIds.length; ++i) {
                _totalSupply[tokenIds[i]] += amounts[i];
            }
        }
        // Burn
        if (to == address(0)) {
            for (uint256 i = 0; i < tokenIds.length; ++i) {
                uint256 id = tokenIds[i];
                uint256 amount = amounts[i];
                uint256 supply = _totalSupply[id];
                require(
                    supply >= amount,
                    "ERC1155Supplyable: burn amount exceeds totalSupply"
                );
                unchecked {
                    _totalSupply[id] = supply - amount;
                }
            }
        }
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "libraries": {
    "NativasToken.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"controller_","type":"address"},{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"address","name":"template_","type":"address"},{"internalType":"address","name":"logger_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"adapter","type":"address"}],"name":"AdapterCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldController","type":"address"},{"indexed":true,"internalType":"address","name":"newControllerr","type":"address"}],"name":"ControlTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAdapter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"logger","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"reason","type":"string"}],"name":"offset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"string[]","name":"reasons","type":"string[]"}],"name":"offsetBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"offsettable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeAdapterTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","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":"setAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"logger_","type":"address"}],"name":"setLogger","outputs":[],"stateMutability":"nonpayable","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"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"bool","name":"offsettable","type":"bool"}],"name":"setMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setOffsettable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"template_","type":"address"}],"name":"setTemplate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"internalType":"uint256","name":"toTokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"fromTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"toTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swapBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"template","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"controller_","type":"address"}],"name":"transferControl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b50604051620045e0380380620045e083398101604081905262000034916200045f565b8183828060405180602001604052806000815250886200005a81620000a160201b60201c565b506200006681620000f1565b506004805460ff191690556200007c8162000103565b506200008a9050816200029b565b506200009681620002a9565b5050505050620006f3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917fa06677f7b64342b4bcbde423684dbdb5356acfe41ad0285b6ecbe6dc4bf427f29190a35050565b6003620000ff8282620005fc565b5050565b6001600160a01b0381166200017a5760405162461bcd60e51b815260206004820152603260248201527f455243313135354f66667365747461626c653a206e6577206c6f6767657220696044820152717320746865207a65726f206164647265737360701b60648201526084015b60405180910390fd5b6040516301ffc9a760e01b8152636c2d653960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015620001c6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ec9190620006c8565b620002735760405162461bcd60e51b815260206004820152604a60248201527f455243313135354f66667365747461626c653a206e65772074656d706c61746560448201527f20646f6573206e6f7420737570706f72742049455243313135354c6f6767657260648201526920696e7465726661636560b01b608482015260a40162000171565b600480546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6006620000ff8282620005fc565b6001600160a01b038116620003185760405162461bcd60e51b815260206004820152602e60248201527f4552433131353545524332303a206e65772074656d706c61746520697320746860448201526d65207a65726f206164647265737360901b606482015260840162000171565b6040516301ffc9a760e01b81526315194a9f60e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa15801562000364573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200038a9190620006c8565b6200040a5760405162461bcd60e51b815260206004820152604360248201527f4552433131353545524332303a206e65772074656d706c61746520646f65732060448201527f6e6f7420737570706f7274204945524332304164617074657220696e7465726660648201526261636560e81b608482015260a40162000171565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b80516001600160a01b03811681146200044457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156200047657600080fd5b62000481856200042c565b602086810151919550906001600160401b0380821115620004a157600080fd5b818801915088601f830112620004b657600080fd5b815181811115620004cb57620004cb62000449565b604051601f8201601f19908116603f01168101908382118183101715620004f657620004f662000449565b816040528281528b868487010111156200050f57600080fd5b600093505b8284101562000533578484018601518185018701529285019262000514565b600086848301015280985050505050505062000552604086016200042c565b915062000562606086016200042c565b905092959194509250565b600181811c908216806200058257607f821691505b602082108103620005a357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620005f757600081815260208120601f850160051c81016020861015620005d25750805b601f850160051c820191505b81811015620005f357828155600101620005de565b5050505b505050565b81516001600160401b0381111562000618576200061862000449565b62000630816200062984546200056d565b84620005a9565b602080601f8311600181146200066857600084156200064f5750858301515b600019600386901b1c1916600185901b178555620005f3565b600085815260208120601f198616915b82811015620006995788860151825594840194600190910190840162000678565b5085821015620006b85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215620006db57600080fd5b81518015158114620006ec57600080fd5b9392505050565b613edd80620007036000396000f3fe608060405234801561001057600080fd5b50600436106102105760003560e01c80637441ed0c11610125578063bdaa7edf116100ad578063f242432a1161007c578063f242432a146104de578063f24ccbfe146104f1578063f5298aca14610507578063f77c47911461051a578063fa6cc1b81461052b57600080fd5b8063bdaa7edf14610443578063ddeadbb614610456578063e985e9c51461047f578063ec064fdd146104bb57600080fd5b806390aa5a58116100f457806390aa5a58146103d7578063a22cb465146103ea578063a8042666146103fd578063b3d05e4914610410578063bd85b0391461042357600080fd5b80637441ed0c146103965780638456cb59146103a9578063862440e2146103b157806389c716d1146103c457600080fd5b8063503cbad8116101a85780636b20c454116101775780636b20c454146103255780636c2d6539146103385780636d16fa411461034b5780636f2ddd931461035e578063731133e91461038357600080fd5b8063503cbad8146102e157806355f804b3146102f45780635722e24a146103075780635c975abb1461031a57600080fd5b80632eb2c2d6116101e45780632eb2c2d6146102935780633f4ba83a146102a65780634e1273f4146102ae5780634f558e79146102ce57600080fd5b8062fdd58e1461021557806301ffc9a71461023b5780630e89341c1461025e5780631f7fdffa1461027e575b600080fd5b610228610223366004612be5565b61053e565b6040519081526020015b60405180910390f35b61024e610249366004612c25565b6105d9565b6040519015158152602001610232565b61027161026c366004612c42565b610629565b6040516102329190612cab565b61029161028c366004612e07565b610634565b005b6102916102a1366004612e9f565b61068b565b6102916106d7565b6102c16102bc366004612f48565b610774565b604051610232919061304d565b61024e6102dc366004612c42565b61089d565b6102916102ef36600461306e565b6108bc565b61029161030236600461309e565b610955565b6102916103153660046130da565b6109d8565b60045460ff1661024e565b6102916103333660046130f5565b610a5d565b610291610346366004613168565b610a92565b6102916103593660046130da565b610ace565b6009546001600160a01b03165b6040516001600160a01b039091168152602001610232565b610291610391366004613168565b610cb2565b6102916103a43660046131bc565b610d03565b610291610d55565b6102916103bf36600461321b565b610dee565b6102916103d23660046130da565b610e67565b6102916103e5366004613268565b610eec565b6102916103f836600461331d565b610f9b565b61029161040b366004613349565b610fa6565b61029161041e3660046133a6565b610ff8565b610228610431366004612c42565b60009081526008602052604090205490565b6102916104513660046133fe565b61108a565b61036b610464366004612c42565b6000908152600a60205260409020546001600160a01b031690565b61024e61048d36600461347b565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b61024e6104c9366004612c42565b60009081526005602052604090205460ff1690565b6102916104ec3660046133a6565b61110d565b60045461010090046001600160a01b031661036b565b6102916105153660046134ae565b611145565b6000546001600160a01b031661036b565b6102916105393660046134e1565b611175565b60006001600160a01b0383166105ae5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526001602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061060a57506001600160e01b031982166303a24d0760e21b145b806105d357506301ffc9a760e01b6001600160e01b03198316146105d3565b60606105d3826111b1565b61065d7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6611291565b6106795760405162461bcd60e51b81526004016105a5906135f6565b6106858484848461131c565b50505050565b6001600160a01b0385163314806106a757506106a7853361048d565b6106c35760405162461bcd60e51b81526004016105a590613648565b6106d08585858585611477565b5050505050565b6107007f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611291565b61076a5760405162461bcd60e51b815260206004820152603560248201527f4e617469766173546f6b656e3a2063616c6c6572206d75737420686176652070604482015274617573657220726f6c6520746f20756e706175736560581b60648201526084016105a5565b61077261161c565b565b606081518351146107d95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016105a5565b600083516001600160401b038111156107f4576107f4612cbe565b60405190808252806020026020018201604052801561081d578160200160208202803683370190505b50905060005b84518110156108955761086885828151811061084157610841613696565b602002602001015185838151811061085b5761085b613696565b602002602001015161053e565b82828151811061087a5761087a613696565b602090810291909101015261088e816136c2565b9050610823565b509392505050565b6000818152600a60205260408120546001600160a01b031615156105d3565b6108d3600080516020613e88833981519152611291565b6109335760405162461bcd60e51b815260206004820152603d6024820152600080516020613e6883398151915260448201527f6469746f7220726f6c6520746f20736574206f66667365747461626c6500000060648201526084016105a5565b6000828152600560205260409020805460ff19168215151790555050565b5050565b61096c600080516020613e88833981519152611291565b6109cc5760405162461bcd60e51b815260206004820152603a6024820152600080516020613e6883398151915260448201527f6469746f7220726f6c6520746f2073657420626173652075726900000000000060648201526084016105a5565b6109d58161166e565b50565b6109e26000611291565b610a545760405162461bcd60e51b815260206004820152603760248201527f4e617469766173546f6b656e3a2063616c6c6572206d7573742068617665206160448201527f646d696e20726f6c6520746f20736574206c6f6767657200000000000000000060648201526084016105a5565b6109d58161167a565b610a6683611807565b610a825760405162461bcd60e51b81526004016105a5906136db565b610a8d838383611825565b505050565b610a9b84611807565b610ab75760405162461bcd60e51b81526004016105a59061372e565b610ac28484846119c4565b61068584848484611ae5565b610ad86000611291565b610b4a5760405162461bcd60e51b815260206004820152603c60248201527f4e617469766173546f6b656e3a2063616c6c6572206d7573742068617665206160448201527f646d696e20726f6c6520746f207472616e66657220636f6e74726f6c0000000060648201526084016105a5565b6001600160a01b038116610bb95760405162461bcd60e51b815260206004820152603060248201527f4e617469766173546f6b656e3a206e657720636f6e74726f6c6c65722069732060448201526f746865207a65726f206164647265737360801b60648201526084016105a5565b6040516301ffc9a760e01b8152637965db0b60e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015610c04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c28919061378b565b610ca95760405162461bcd60e51b815260206004820152604660248201527f4e617469766173546f6b656e3a206e657720636f6e74726f6c6c657220646f6560448201527f73206e6f7420737570706f72742049416363657373436f6e74726f6c20696e7460648201526565726661636560d01b608482015260a4016105a5565b6109d581611bcf565b610cdb7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6611291565b610cf75760405162461bcd60e51b81526004016105a5906135f6565b61068584848484611c1f565b610d2c7f724f6a44d576143e18c60911798b2b15551ca96bd8f7cb7524b8fa36253a26d8611291565b610d485760405162461bcd60e51b81526004016105a5906137a8565b6106d08585858585611d01565b610d7e7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611291565b610de65760405162461bcd60e51b815260206004820152603360248201527f4e617469766173546f6b656e3a2063616c6c6572206d75737420686176652070604482015272617573657220726f6c6520746f20706175736560681b60648201526084016105a5565b610772611dfc565b610e05600080516020613e88833981519152611291565b610e5d5760405162461bcd60e51b81526020600482015260356024820152600080516020613e688339815191526044820152746469746f7220726f6c6520746f207365742075726960581b60648201526084016105a5565b6109518282611e39565b610e716000611291565b610ee35760405162461bcd60e51b815260206004820152603960248201527f4e617469766173546f6b656e3a2063616c6c6572206d7573742068617665206160448201527f646d696e20726f6c6520746f207365742074656d706c6174650000000000000060648201526084016105a5565b6109d581611e8e565b610f03600080516020613e88833981519152611291565b610f635760405162461bcd60e51b815260206004820152603a6024820152600080516020613e6883398151915260448201527f6469746f7220726f6c6520746f20736574206d6574616461746100000000000060648201526084016105a5565b610f6f8686868661200a565b6000868152600560205260409020805460ff1916821515179055610f938683611e39565b505050505050565b61095133838361214f565b610fcf7f724f6a44d576143e18c60911798b2b15551ca96bd8f7cb7524b8fa36253a26d8611291565b610feb5760405162461bcd60e51b81526004016105a5906137a8565b6106d0858585858561222f565b6000838152600a60205260409020546001600160a01b0316336001600160a01b03161461107d5760405162461bcd60e51b815260206004820152602d60248201527f4552433131353545524332303a2063616c6c6572206973206e6f74207468652060448201526c3a37b5b2b71030b230b83a32b960991b60648201526084016105a5565b6106d085858585856122a8565b6110a1600080516020613e88833981519152611291565b6111015760405162461bcd60e51b81526020600482015260396024820152600080516020613e6883398151915260448201527f6469746f7220726f6c6520746f2073657420616461707465720000000000000060648201526084016105a5565b6106858484848461200a565b6001600160a01b0385163314806111295750611129853361048d565b61107d5760405162461bcd60e51b81526004016105a590613648565b61114e83611807565b61116a5760405162461bcd60e51b81526004016105a5906136db565b610a8d8383836119c4565b61117e84611807565b61119a5760405162461bcd60e51b81526004016105a59061372e565b6111a5848484611825565b610685848484846123e4565b6000818152600760205260408120805460609291906111cf906137fb565b80601f01602080910402602001604051908101604052809291908181526020018280546111fb906137fb565b80156112485780601f1061121d57610100808354040283529160200191611248565b820191906000526020600020905b81548152906001019060200180831161122b57829003601f168201915b5050505050905060008151116112665761126183612459565b61128a565b60068160405160200161127a929190613835565b6040516020818303038152906040525b9392505050565b600080546001600160a01b03166001600160a01b03166391d1485483336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381865afa1580156112f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d3919061378b565b6001600160a01b0384166113425760405162461bcd60e51b81526004016105a5906138bc565b81518351146113635760405162461bcd60e51b81526004016105a5906138fd565b33611373816000878787876124ed565b60005b845181101561140f5783818151811061139157611391613696565b6020026020010151600160008784815181106113af576113af613696565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546113f79190613945565b90915550819050611407816136c2565b915050611376565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611460929190613958565b60405180910390a46106d0816000878787876124fb565b81518351146114985760405162461bcd60e51b81526004016105a5906138fd565b6001600160a01b0384166114be5760405162461bcd60e51b81526004016105a590613986565b336114cd8187878787876124ed565b60005b84518110156115b65760008582815181106114ed576114ed613696565b60200260200101519050600085838151811061150b5761150b613696565b60209081029190910181015160008481526001835260408082206001600160a01b038e16835290935291909120549091508181101561155c5760405162461bcd60e51b81526004016105a5906139cb565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061159b908490613945565b92505081905550505050806115af906136c2565b90506114d0565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611606929190613958565b60405180910390a4610f938187878787876124fb565b611624612656565b6004805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60066109518282613a5b565b6001600160a01b0381166116eb5760405162461bcd60e51b815260206004820152603260248201527f455243313135354f66667365747461626c653a206e6577206c6f6767657220696044820152717320746865207a65726f206164647265737360701b60648201526084016105a5565b6040516301ffc9a760e01b8152636c2d653960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611736573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061175a919061378b565b6117df5760405162461bcd60e51b815260206004820152604a60248201527f455243313135354f66667365747461626c653a206e65772074656d706c61746560448201527f20646f6573206e6f7420737570706f72742049455243313135354c6f6767657260648201526920696e7465726661636560b01b608482015260a4016105a5565b600480546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60006001600160a01b0382163314806105d357506105d3823361048d565b6001600160a01b03831661184b5760405162461bcd60e51b81526004016105a590613b1a565b805182511461186c5760405162461bcd60e51b81526004016105a5906138fd565b600033905061188f818560008686604051806020016040528060008152506124ed565b60005b83518110156119575760008482815181106118af576118af613696565b6020026020010151905060008483815181106118cd576118cd613696565b60209081029190910181015160008481526001835260408082206001600160a01b038c16835290935291909120549091508181101561191e5760405162461bcd60e51b81526004016105a590613b5d565b60009283526001602090815260408085206001600160a01b038b168652909152909220910390558061194f816136c2565b915050611892565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516119a8929190613958565b60405180910390a4604080516020810190915260009052610685565b6001600160a01b0383166119ea5760405162461bcd60e51b81526004016105a590613b1a565b3360006119f68461269f565b90506000611a038461269f565b9050611a23838760008585604051806020016040528060008152506124ed565b60008581526001602090815260408083206001600160a01b038a16845290915290205484811015611a665760405162461bcd60e51b81526004016105a590613b5d565b60008681526001602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090525b50505050505050565b60008381526005602052604090205460ff161515600114611b5e5760405162461bcd60e51b815260206004820152602d60248201527f455243313135354f66667365747461626c653a20746f6b656e206d757374206260448201526c65206f66667365747461626c6560981b60648201526084016105a5565b60048054604051636c2d653960e01b81526101009091046001600160a01b031691636c2d653991611b9791889188918891889101613ba1565b600060405180830381600087803b158015611bb157600080fd5b505af1158015611bc5573d6000803e3d6000fd5b5050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917fa06677f7b64342b4bcbde423684dbdb5356acfe41ad0285b6ecbe6dc4bf427f29190a35050565b6001600160a01b038416611c455760405162461bcd60e51b81526004016105a5906138bc565b336000611c518561269f565b90506000611c5e8561269f565b9050611c6f836000898585896124ed565b60008681526001602090815260408083206001600160a01b038b16845290915281208054879290611ca1908490613945565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611adc836000898989896126ea565b60005b8451811015611d705760056000868381518110611d2357611d23613696565b60209081029190910181015182528101919091526040016000205460ff1615611d5e5760405162461bcd60e51b81526004016105a590613bd8565b80611d68816136c2565b915050611d04565b5060005b8351811015611de45760056000858381518110611d9357611d93613696565b60209081029190910181015182528101919091526040016000205460ff161515600114611dd25760405162461bcd60e51b81526004016105a590613c2c565b80611ddc816136c2565b915050611d74565b50611df0858584611825565b6106d08584848461131c565b611e046127a5565b6004805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586116513390565b6000828152600760205260409020611e518282613a5b565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b82604051611e829190612cab565b60405180910390a25050565b6001600160a01b038116611efb5760405162461bcd60e51b815260206004820152602e60248201527f4552433131353545524332303a206e65772074656d706c61746520697320746860448201526d65207a65726f206164647265737360901b60648201526084016105a5565b6040516301ffc9a760e01b81526315194a9f60e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a919061378b565b611fe85760405162461bcd60e51b815260206004820152604360248201527f4552433131353545524332303a206e65772074656d706c61746520646f65732060448201527f6e6f7420737570706f7274204945524332304164617074657220696e7465726660648201526261636560e81b608482015260a4016105a5565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6009546001600160a01b03166120755760405162461bcd60e51b815260206004820152602a60248201527f4552433131353545524332303a2074656d706c61746520697320746865207a65604482015269726f206164647265737360b01b60648201526084016105a5565b60095460009061208d906001600160a01b03166127eb565b6040516315194a9f60e01b81529091506001600160a01b038216906315194a9f906120c2908890889088908890600401613c7a565b600060405180830381600087803b1580156120dc57600080fd5b505af11580156120f0573d6000803e3d6000fd5b5050506000868152600a602052604080822080546001600160a01b0319166001600160a01b038616908117909155905190925087917f61c2c9c06042f8bc363b6e5a8f27423430ca63f44ecb4a7e79df6737352ea8c291a35050505050565b816001600160a01b0316836001600160a01b0316036121c25760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016105a5565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008481526005602052604090205460ff161561225e5760405162461bcd60e51b81526004016105a590613bd8565b60008381526005602052604090205460ff1615156001146122915760405162461bcd60e51b81526004016105a590613c2c565b61229c8585846119c4565b6106d085848484611c1f565b6001600160a01b0384166122ce5760405162461bcd60e51b81526004016105a590613986565b3360006122da8561269f565b905060006122e78561269f565b90506122f78389898585896124ed565b60008681526001602090815260408083206001600160a01b038c1684529091529020548581101561233a5760405162461bcd60e51b81526004016105a5906139cb565b60008781526001602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612379908490613945565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46123d9848a8a8a8a8a6126ea565b505050505050505050565b60005b83518110156106d0576124478585838151811061240657612406613696565b602002602001015185848151811061242057612420613696565b602002602001015185858151811061243a5761243a613696565b6020026020010151611ae5565b80612451816136c2565b9150506123e7565b606060038054612468906137fb565b80601f0160208091040260200160405190810160405280929190818152602001828054612494906137fb565b80156124e15780601f106124b6576101008083540402835291602001916124e1565b820191906000526020600020905b8154815290600101906020018083116124c457829003601f168201915b50505050509050919050565b610f93868686868686612885565b6001600160a01b0384163b15610f935760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061253f9089908990889088908890600401613cba565b6020604051808303816000875af192505050801561257a575060408051601f3d908101601f1916820190925261257791810190613d18565b60015b61262657612586613d35565b806308c379a0036125bf575061259a613d51565b806125a557506125c1565b8060405162461bcd60e51b81526004016105a59190612cab565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016105a5565b6001600160e01b0319811663bc197c8160e01b14611adc5760405162461bcd60e51b81526004016105a590613dda565b60045460ff166107725760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105a5565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106126d9576126d9613696565b602090810291909101015292915050565b6001600160a01b0384163b15610f935760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061272e9089908990889088908890600401613e22565b6020604051808303816000875af1925050508015612769575060408051601f3d908101601f1916820190925261276691810190613d18565b60015b61277557612586613d35565b6001600160e01b0319811663f23a6e6160e01b14611adc5760405162461bcd60e51b81526004016105a590613dda565b60045460ff16156107725760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105a5565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b0381166128805760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b60448201526064016105a5565b919050565b612893868686868686612935565b60005b8351811015611adc576128c18482815181106128b4576128b4613696565b602002602001015161089d565b15156001146129255760405162461bcd60e51b815260206004820152602a60248201527f4552433131353545524332303a20746f6b656e206164617074657220646f6573604482015269081b9bdd08195e1a5cdd60b21b60648201526084016105a5565b61292e816136c2565b9050612896565b612943868686868686612ac6565b6001600160a01b0385166129ca5760005b83518110156129c85782818151811061296f5761296f613696565b60200260200101516008600086848151811061298d5761298d613696565b6020026020010151815260200190815260200160002060008282546129b29190613945565b909155506129c19050816136c2565b9050612954565b505b6001600160a01b038416610f935760005b8351811015611adc5760008482815181106129f8576129f8613696565b602002602001015190506000848381518110612a1657612a16613696565b6020026020010151905060006008600084815260200190815260200160002054905081811015612aa35760405162461bcd60e51b815260206004820152603260248201527f45524331313535537570706c7961626c653a206275726e20616d6f756e74206560448201527178636565647320746f74616c537570706c7960701b60648201526084016105a5565b60009283526008602052604090922091039055612abf816136c2565b90506129db565b612ad4868686868686612b66565b60005b8351811015611adc57612af58482815181106128b4576128b4613696565b612b565760405162461bcd60e51b815260206004820152602c60248201527f4552433131353555524953746f7261626c653a20746f6b656e2075726920646f60448201526b195cc81b9bdd08195e1a5cdd60a21b60648201526084016105a5565b612b5f816136c2565b9050612ad7565b60045460ff1615610f935760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b60648201526084016105a5565b80356001600160a01b038116811461288057600080fd5b60008060408385031215612bf857600080fd5b612c0183612bce565b946020939093013593505050565b6001600160e01b0319811681146109d557600080fd5b600060208284031215612c3757600080fd5b813561128a81612c0f565b600060208284031215612c5457600080fd5b5035919050565b60005b83811015612c76578181015183820152602001612c5e565b50506000910152565b60008151808452612c97816020860160208601612c5b565b601f01601f19169290920160200192915050565b60208152600061128a6020830184612c7f565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612cf957612cf9612cbe565b6040525050565b60006001600160401b03821115612d1957612d19612cbe565b5060051b60200190565b600082601f830112612d3457600080fd5b81356020612d4182612d00565b604051612d4e8282612cd4565b83815260059390931b8501820192828101915086841115612d6e57600080fd5b8286015b84811015612d895780358352918301918301612d72565b509695505050505050565b600082601f830112612da557600080fd5b81356001600160401b03811115612dbe57612dbe612cbe565b604051612dd5601f8301601f191660200182612cd4565b818152846020838601011115612dea57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215612e1d57600080fd5b612e2685612bce565b935060208501356001600160401b0380821115612e4257600080fd5b612e4e88838901612d23565b94506040870135915080821115612e6457600080fd5b612e7088838901612d23565b93506060870135915080821115612e8657600080fd5b50612e9387828801612d94565b91505092959194509250565b600080600080600060a08688031215612eb757600080fd5b612ec086612bce565b9450612ece60208701612bce565b935060408601356001600160401b0380821115612eea57600080fd5b612ef689838a01612d23565b94506060880135915080821115612f0c57600080fd5b612f1889838a01612d23565b93506080880135915080821115612f2e57600080fd5b50612f3b88828901612d94565b9150509295509295909350565b60008060408385031215612f5b57600080fd5b82356001600160401b0380821115612f7257600080fd5b818501915085601f830112612f8657600080fd5b81356020612f9382612d00565b604051612fa08282612cd4565b83815260059390931b8501820192828101915089841115612fc057600080fd5b948201945b83861015612fe557612fd686612bce565b82529482019490820190612fc5565b96505086013592505080821115612ffb57600080fd5b5061300885828601612d23565b9150509250929050565b600081518084526020808501945080840160005b8381101561304257815187529582019590820190600101613026565b509495945050505050565b60208152600061128a6020830184613012565b80151581146109d557600080fd5b6000806040838503121561308157600080fd5b82359150602083013561309381613060565b809150509250929050565b6000602082840312156130b057600080fd5b81356001600160401b038111156130c657600080fd5b6130d284828501612d94565b949350505050565b6000602082840312156130ec57600080fd5b61128a82612bce565b60008060006060848603121561310a57600080fd5b61311384612bce565b925060208401356001600160401b038082111561312f57600080fd5b61313b87838801612d23565b9350604086013591508082111561315157600080fd5b5061315e86828701612d23565b9150509250925092565b6000806000806080858703121561317e57600080fd5b61318785612bce565b9350602085013592506040850135915060608501356001600160401b038111156131b057600080fd5b612e9387828801612d94565b600080600080600060a086880312156131d457600080fd5b6131dd86612bce565b945060208601356001600160401b03808211156131f957600080fd5b61320589838a01612d23565b95506040880135915080821115612eea57600080fd5b6000806040838503121561322e57600080fd5b8235915060208301356001600160401b0381111561324b57600080fd5b61300885828601612d94565b803560ff8116811461288057600080fd5b60008060008060008060c0878903121561328157600080fd5b8635955060208701356001600160401b038082111561329f57600080fd5b6132ab8a838b01612d94565b965060408901359150808211156132c157600080fd5b6132cd8a838b01612d94565b95506132db60608a01613257565b945060808901359150808211156132f157600080fd5b506132fe89828a01612d94565b92505060a087013561330f81613060565b809150509295509295509295565b6000806040838503121561333057600080fd5b61333983612bce565b9150602083013561309381613060565b600080600080600060a0868803121561336157600080fd5b61336a86612bce565b945060208601359350604086013592506060860135915060808601356001600160401b0381111561339a57600080fd5b612f3b88828901612d94565b600080600080600060a086880312156133be57600080fd5b6133c786612bce565b94506133d560208701612bce565b9350604086013592506060860135915060808601356001600160401b0381111561339a57600080fd5b6000806000806080858703121561341457600080fd5b8435935060208501356001600160401b038082111561343257600080fd5b61343e88838901612d94565b9450604087013591508082111561345457600080fd5b5061346187828801612d94565b92505061347060608601613257565b905092959194509250565b6000806040838503121561348e57600080fd5b61349783612bce565b91506134a560208401612bce565b90509250929050565b6000806000606084860312156134c357600080fd5b6134cc84612bce565b95602085013595506040909401359392505050565b600080600080608085870312156134f757600080fd5b61350085612bce565b93506020808601356001600160401b038082111561351d57600080fd5b61352989838a01612d23565b9550604088013591508082111561353f57600080fd5b61354b89838a01612d23565b9450606088013591508082111561356157600080fd5b818801915088601f83011261357557600080fd5b813561358081612d00565b60405161358d8282612cd4565b82815260059290921b840185019185810191508b8311156135ad57600080fd5b8585015b838110156135e5578035858111156135c95760008081fd5b6135d78e89838a0101612d94565b8452509186019186016135b1565b50989b979a50959850505050505050565b60208082526032908201527f4e617469766173546f6b656e3a2063616c6c6572206d7573742068617665206d6040820152711a5b9d195c881c9bdb19481d1bc81b5a5b9d60721b606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016136d4576136d46136ac565b5060010190565b60208082526033908201527f4e617469766173546f6b656e3a2063616c6c6572206973206e6f7420746f6b656040820152721b881bdddb995c881bdc88185c1c1c9bdd9959606a1b606082015260800190565b60208082526039908201527f455243313135354f66667365747461626c653a2063616c6c6572206973206e6f60408201527f7420746f6b656e206f776e6572206f7220617070726f76656400000000000000606082015260800190565b60006020828403121561379d57600080fd5b815161128a81613060565b60208082526033908201527f4e617469766173546f6b656e3a2063616c6c6572206d75737420686176652073604082015272077617070657220726f6c6520746f207377617606c1b606082015260800190565b600181811c9082168061380f57607f821691505b60208210810361382f57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808454613843816137fb565b6001828116801561385b57600181146138705761389f565b60ff198416875282151583028701945061389f565b8860005260208060002060005b858110156138965781548a82015290840190820161387d565b50505082870194505b5050505083516138b3818360208801612c5b565b01949350505050565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b808201808211156105d3576105d36136ac565b60408152600061396b6040830185613012565b828103602084015261397d8185613012565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b601f821115610a8d57600081815260208120601f850160051c81016020861015613a3c5750805b601f850160051c820191505b81811015610f9357828155600101613a48565b81516001600160401b03811115613a7457613a74612cbe565b613a8881613a8284546137fb565b84613a15565b602080601f831160018114613abd5760008415613aa55750858301515b600019600386901b1c1916600185901b178555610f93565b600085815260208120601f198616915b82811015613aec57888601518255948401946001909101908401613acd565b5085821015613b0a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60018060a01b0385168152836020820152826040820152608060608201526000613bce6080830184612c7f565b9695505050505050565b60208082526034908201527f45524331313535537761707061626c653a20746f6b656e2066726f6d206d757360408201527374206e6f74206265206f66667365747461626c6560601b606082015260800190565b6020808252602e908201527f45524331313535537761707061626c653a20746f6b656e20746f206d7573742060408201526d6265206f66667365747461626c6560901b606082015260800190565b848152608060208201526000613c936080830186612c7f565b8281036040840152613ca58186612c7f565b91505060ff8316606083015295945050505050565b6001600160a01b0386811682528516602082015260a060408201819052600090613ce690830186613012565b8281036060840152613cf88186613012565b90508281036080840152613d0c8185612c7f565b98975050505050505050565b600060208284031215613d2a57600080fd5b815161128a81612c0f565b600060033d1115613d4e5760046000803e5060005160e01c5b90565b600060443d1015613d5f5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715613d8e57505050505090565b8285019150815181811115613da65750505050505090565b843d8701016020828501011115613dc05750505050505090565b613dcf60208286010187612cd4565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613e5c90830184612c7f565b97965050505050505056fe4e617469766173546f6b656e3a2063616c6c6572206d7573742068617665206521d1167972f621f75904fb065136bc8b53c7ba1c60ccd3a7758fbee465851e9ca26469706673582212200958a49c775f04818504c0e8111e7c35aa1a4356b1aa3fd27d7ee689c415dce564736f6c63430008110033000000000000000000000000e64540b86fed02f249e549bef33074440ab825cd00000000000000000000000000000000000000000000000000000000000000800000000000000000000000009a5d95f88ee2544abfdeec736bb6366ea1d56089000000000000000000000000e6a1f78bdc92aecbc708cde8073a345334fa64970000000000000000000000000000000000000000000000000000000000000007697066733a2f2f00000000000000000000000000000000000000000000000000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000e64540b86fed02f249e549bef33074440ab825cd00000000000000000000000000000000000000000000000000000000000000800000000000000000000000009a5d95f88ee2544abfdeec736bb6366ea1d56089000000000000000000000000e6a1f78bdc92aecbc708cde8073a345334fa64970000000000000000000000000000000000000000000000000000000000000007697066733a2f2f00000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : controller_ (address): 0xe64540b86fed02f249e549bef33074440ab825cd
Arg [1] : baseURI_ (string): ipfs://
Arg [2] : template_ (address): 0x9a5d95f88ee2544abfdeec736bb6366ea1d56089
Arg [3] : logger_ (address): 0xe6a1f78bdc92aecbc708cde8073a345334fa6497

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000e64540b86fed02f249e549bef33074440ab825cd
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000009a5d95f88ee2544abfdeec736bb6366ea1d56089
Arg [3] : 000000000000000000000000e6a1f78bdc92aecbc708cde8073a345334fa6497
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [5] : 697066733a2f2f00000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.