How best to store Legacy Token (Token V1) Identifiers? #92
-
From Discord:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Storing Legacy Token(Token V1) Collection IdsSince Legacy tokens collections are referenced by creator, and collection name, you'll just need to store both. You can create a struct like below: use aptos_framework::string::String;
struct LegacyCollectionId has store, drop {
creator: address,
name: String
}
struct Storage has key {
legacy_collections: vector<LegacyCollectionId>
} Storing Legacy Token(Token V1) Token IdsFor tokens, you can store the vector<TokenId> ... |
Beta Was this translation helpful? Give feedback.
Storing Legacy Token(Token V1) Collection Ids
Since Legacy tokens collections are referenced by creator, and collection name, you'll just need to store both.
You can create a struct like below:
Storing Legacy Token(Token V1) Token Ids
For tokens, you can store the
TokenDataId
or theTokenId
based on your needs:https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-token/sources/token.move#L168-L184