Skip to content

Commit

Permalink
feat: erc1155 supply interfacing
Browse files Browse the repository at this point in the history
  • Loading branch information
seinmyung25 committed Apr 9, 2024
1 parent 0cf7bbc commit 8ee2a27
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions contracts/token/ERC1155/EcoERC1155Upgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

pragma solidity ^0.8.0;

import { IERC1155MetadataURI, IEcoERC1155 } from "./IERC1155.sol";
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import { IERC1155MetadataURI, IEcoERC1155, IERC1155Supply } from "./IERC1155.sol";

import { ERC1155Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";
import { ERC1155MintableUpgradeable } from "./ERC1155MintableUpgradeable.sol";
Expand All @@ -15,6 +16,7 @@ import { ERC1155SupplyUpgradeable } from "@openzeppelin/contracts-upgradeable/to
import { ERC1155PausableUpgradeable } from "./ERC1155PausableUpgradeable.sol";

contract EcoERC1155Upgradeable is
IEcoERC1155,
ERC1155MintableUpgradeable,
EcoERC1155URIControl,
ERC1155BurnableUpgradeable,
Expand All @@ -28,7 +30,12 @@ contract EcoERC1155Upgradeable is

function supportsInterface(
bytes4 interfaceId
) public view override(ERC1155MintableUpgradeable, ERC1155Upgradeable, EcoERC1155URIControl) returns (bool) {
)
public
view
override(ERC1155MintableUpgradeable, ERC1155Upgradeable, EcoERC1155URIControl, IERC165)
returns (bool)
{
return super.supportsInterface(interfaceId);
}

Expand All @@ -52,4 +59,16 @@ contract EcoERC1155Upgradeable is
{
return super.uri(id);
}

function totalSupply(uint256 id) public view override(ERC1155SupplyUpgradeable, IERC1155Supply) returns (uint256) {
return super.totalSupply(id);
}

function totalSupply() public view override(ERC1155SupplyUpgradeable, IERC1155Supply) returns (uint256) {
return super.totalSupply();
}

function exists(uint256 id) public view override(ERC1155SupplyUpgradeable, IERC1155Supply) returns (bool) {
return super.exists(id);
}
}

0 comments on commit 8ee2a27

Please sign in to comment.