Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SBT signaling standard #6

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update docs
TomiOhl committed Nov 15, 2023
commit 5467f7bb41effacd80a87769342c24133149b32c
14 changes: 0 additions & 14 deletions docs/contracts/interfaces/IBasicGuildRewardNFT.md
Original file line number Diff line number Diff line change
@@ -220,17 +220,3 @@ error IncorrectSignature()

Error thrown when the supplied signature is invalid.

### NonExistentToken

```solidity
error NonExistentToken(uint256 tokenId)
```

Error thrown when trying to query info about a token that's not (yet) minted.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| tokenId | uint256 | The queried id. |

60 changes: 60 additions & 0 deletions docs/contracts/interfaces/IERC5192.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# IERC5192

## Functions

### locked

```solidity
function locked(
uint256 tokenId
) external returns (bool)
```

Returns the locking status of an Soulbound Token

SBTs assigned to zero address are considered invalid, and queries
about them do throw.

#### Parameters

| Name | Type | Description |
| :--- | :--- | :---------- |
| `tokenId` | uint256 | The identifier for an SBT. |

## Events

### Locked

```solidity
event Locked(
uint256 tokenId
)
```

Emitted when the locking status is changed to locked.

If a token is minted and the status is locked, this event should be emitted.

#### Parameters

| Name | Type | Description |
| :--- | :--- | :---------- |
| `tokenId` | uint256 | The identifier for a token. |
### Unlocked

```solidity
event Unlocked(
uint256 tokenId
)
```

Emitted when the locking status is changed to unlocked.

If a token is minted and the status is unlocked, this event should be emitted.

#### Parameters

| Name | Type | Description |
| :--- | :--- | :---------- |
| `tokenId` | uint256 | The identifier for a token. |

33 changes: 33 additions & 0 deletions docs/contracts/token/SoulboundERC721.md
Original file line number Diff line number Diff line change
@@ -41,6 +41,25 @@ See {IERC165-supportsInterface}.
| :--- | :--- | :---------- |
| `interfaceId` | bytes4 | |

### locked

```solidity
function locked(
uint256 tokenId
) external returns (bool)
```

Returns the locking status of an Soulbound Token

SBTs assigned to zero address are considered invalid, and queries
about them do throw.

#### Parameters

| Name | Type | Description |
| :--- | :--- | :---------- |
| `tokenId` | uint256 | The identifier for an SBT. |

### approve

```solidity
@@ -169,6 +188,20 @@ Still used for minting/burning.

## Custom errors

### NonExistentToken

```solidity
error NonExistentToken(uint256 tokenId)
```

Error thrown when trying to query info about a token that's not (yet) minted.

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| tokenId | uint256 | The queried id. |

### Soulbound

```solidity