flow-hydraulics / flow-pds

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

change PackNFT and PackDistribution to start flowID from 1 #127

Closed sadief closed 3 years ago

sadief commented 3 years ago

This changes the PackNFT and PackDistribution to start minting from FlowID 1 instead of 0.

sadief commented 3 years ago

Hey @latenssi! Thanks! Sorry - I had some changes that I hadn't pushed. I took our suggestion though and moved to using the totalSupply instead - that seems simpler!

Wondering if you might be able to help with the testing by any chance? I'm time boxed a bit on this and have been struggling to get all the tests working. I've updated all the currentPackIds to what I believe they should be (basically currentID should now be equal to the total number of packs instead of numOfPacks - 1).

I'm mainly running into this issue:

    contracts_test.go:435: 
                Error Trace:    contracts_test.go:435
                Error:          Received unexpected error:
                                execution error code 1101: [Error Code: 1101] cadence runtime error Execution failed:
                                error: assertion failed: CommitHash was not verified
                                  --> 01cf0e2f2f715450.PackNFT:86:12
                                   |
                                86 |             assert(self.commitHash == String.encodeHex(hash), message: "CommitHash was not verified")
                                   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                Test:           TestPDSRevealPackNFTs

It looks like the correct IDs being used, but I don't have the time to fully dive into debugging it - I'm hoping someone from equilibrium with more context on the tests might be able to help unblock this?

latenssi commented 3 years ago

Hi @sadief! I updated couple of lines in the tests, you can see the changes here: b1a9a1b