Skip to content

Commit 67214a7

Browse files
author
Yash Agrawal
committed
feat: add initial implementation of sbt
1 parent 0e7703e commit 67214a7

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

contracts/SBTToken.sol

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ contract SBTToken is
5656
/**
5757
* @dev See {IERC721Enumerable-totalSupply}.
5858
*/
59-
function totalSupply() public view virtual override(ISBTToken, IERC721EnumerableUpgradeable) returns (uint256) {
59+
function totalSupply()
60+
public
61+
view
62+
virtual
63+
override(ISBTToken, IERC721EnumerableUpgradeable)
64+
returns (uint256)
65+
{
6066
return tokenIdCounter.current();
6167
}
6268

@@ -66,7 +72,13 @@ contract SBTToken is
6672
function tokenOfOwnerByIndex(
6773
address _owner,
6874
uint256 index
69-
) public view virtual override(ISBTToken, IERC721EnumerableUpgradeable) returns (uint256) {
75+
)
76+
public
77+
view
78+
virtual
79+
override(ISBTToken, IERC721EnumerableUpgradeable)
80+
returns (uint256)
81+
{
7082
// solhint-disable-next-line reason-string
7183
require(
7284
index < tokenIdsMapOfOwner[_owner].length(),
@@ -80,7 +92,13 @@ contract SBTToken is
8092
*/
8193
function tokenByIndex(
8294
uint256 index
83-
) public view virtual override(ISBTToken, IERC721EnumerableUpgradeable) returns (uint256) {
95+
)
96+
public
97+
view
98+
virtual
99+
override(ISBTToken, IERC721EnumerableUpgradeable)
100+
returns (uint256)
101+
{
84102
// solhint-disable-next-line reason-string
85103
require(
86104
index < tokenIdCounter.current(),

contracts/interfaces/ISBTToken.sol

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ interface ISBTToken {
2222
* @param _tokenId The token for which we are setting the image uri.
2323
* @param _data The data that is used as uri.
2424
*/
25-
function setTokenURIImage(
26-
uint256 _tokenId,
27-
string memory _data
28-
) external;
25+
function setTokenURIImage(uint256 _tokenId, string memory _data) external;
2926

3027
/*
3128
* @dev get token ids by owner

0 commit comments

Comments
 (0)