-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Abstract This PR introduces granular asset minting which would enable sub identifiers to be included at asset creation. These sub identifiers can include important metadata and be used to enable native level NFTs. **This adds:** - A new asset ID construction (which incorporates the contract ID and the sub asset ID). - New receipt logs for minting and burning which are helpful for indexing. - Changes to the MINT and BURN opcodes. ### Cons - This removes the nice feature that asset IDs are the contract ID. ### Pros - Native level UTXO based NFTs. - Single contract multi-asset pools (useful for common AMM designs). Implementation tickets/PRs: - FuelLabs/fuel-vm#496 - FuelLabs/fuels-ts#1067 - FuelLabs/fuel-indexer#1012 - FuelLabs/sway#4651 --------- Co-authored-by: Brandon Kite <brandonkite92@gmail.com> Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
- Loading branch information
1 parent
1176515
commit b241dc9
Showing
5 changed files
with
101 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Asset ID | ||
|
||
The _asset ID_ (also called _asset hash_) of a asset is computed as | ||
the [hash](../protocol/cryptographic-primitives.md#hashing) of the `CONTRACT_ID` and a 256-bit `SUB_IDENTIFIER`. | ||
|
||
```python | ||
sha256(CONTRACT_ID ++ SUB_IDENTIFIER) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters