Skip to content

Commit

Permalink
Update erc-7765.md
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmint2024 committed Oct 17, 2024
1 parent a37a854 commit 47133d2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ERCS/erc-7765.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ requires: 165, 721

This EIP defines an interface to carry a real world asset with some privileges that can be exercised by the holder of the corresponding NFT. The EIP standardizes the interface for non-fungible tokens representing real world assets with privileges to be exercised, such as products sold onchain which can be redeemed in the real world.

And the privileges we describe here specifically refer to the rights and interests bound to the RWA NFT that can be executed by the holder in the real world.

## Motivation

NFTs bound to real-world assets sometimes need to carry certain privileges that can be exercised by the holder. Users can initiate transactions onchain to specify the exercise of a certain privilege, thereby achieving real-world privileges that directly map the onchain privilege through subsequent operations. For example, if a certain product such as a pair of shoes is sold onchain in the representation of NFT, the NFT holder can exercise the privilege of exchanging physical shoes offchain, to achieve the purpose of interoperability between the blockchain and the real world.
Expand Down Expand Up @@ -92,6 +94,10 @@ interface IERC7765 /* is IERC721, IERC165 */ {
}
```

The function `exercisePrivilege` performs the exercise action to a specific privilege of a token. If succeeds, it is expected to emit a `PrivilegeExercised` event.

The function `getPrivilegeIds` provides a way to manage the binding relationship between NFTs and privilegeIds.

The **metadata extension** is OPTIONAL for [EIP-7765](./eip-7765.md) smart contracts. This allows your smart contract to be interrogated for its details about the privileges which your NFTs carry.

```
Expand Down Expand Up @@ -133,23 +139,21 @@ This is the “EIP-7765 Metadata JSON Schema” referenced above.
}
```

`IERC7765Metadata` provides specifications for obtaining metadata information of privileges. A contract that implements `IERC7765Metadata` **SHALL** also implement `IERC7765`.

## Rationale

1. The function `exercisePrivilege` performs the exercise action to a specific privilege of a token. If succeeds, it is expected to emit a PrivilegeExercised event. With this event emitted onchain, we can determine that the user has confirmed the exercise of this privilege, so as to implement the privilege in the real world.
1. With the `PrivilegeExercised` event emitted onchain, we can determine that the user has confirmed the exercise of this privilege, so as to implement the privilege in the real world.

2. We choose to include an address `_to` for functions `exercisePrivilege`, `isExercisable` and `isExercised` so that a specific privilege of an NFT MAY be exercised for someone who will benefit from it other than the NFT holder nor the transaction initiator. And This EIP doesn't assume who has the power to perform this action, it's totally decided by the developers who are using this standard.

3. We choose to include an extra `_data` field to function `exercisePrivilege` for extra message or future extension. For example, developers can use `_data` to exercise a privilege that takes effect directly onchain such as direct distribution of cryptocurrency assets.

4. The boolean view functions of `isExercisable` and `isExercised` can be used to check whether a specific privilege of an NFT can be exercisable or has been exercised to the `_to` address.

5. The function `getPrivilegeIds` provides a way to manage the binding relationship between NFTs and privilegeIds.

6. EIP-7765Metadata provides specifications for obtaining metadata information of privileges. A contract that implements EIP-7765Metadata **SHALL** also implement EIP-7765.

## Backwards Compatibility

This standard is an extension of ERC-721. It is fully compatible with both of the commonly used optional extensions (ERC-721Metadata and ERC-721Enumerable) mentioned in the ERC-721 standard.
This standard is an extension of ERC-721. It is fully compatible with both of the commonly used optional extensions (`IERC721Metadata` and `IERC721Enumerable`) mentioned in the ERC-721 standard.

## Reference Implementation

Expand Down

0 comments on commit 47133d2

Please sign in to comment.