flow-hydraulics / flow-pds

This repository is currently not maintained
4 stars 8 forks source link

Simplify hashString() #57

Open rheaplex opened 2 years ago

rheaplex commented 2 years ago

https://github.com/flow-hydraulics/flow-pds/blob/main/cadence-contracts/PDS.cdc#L21

You can get a simpler identifier using self.getType().identifier:

self.getType().identifier.concat(".").concat(self.id.toString())

-> A.0000000000000001.HelloWorld.01

or a much simpler (but much less meaningful) unique identifier using self.uuid :

self.uuid

-> 56343473567356

whalelephant commented 2 years ago

Hi @rheaplex, This function constructs the hashString for verification of the commitHash from input from the backend server. The type Collectible is a representation of the input strings only, it is not actually a NFT.