fabcotech / rchain-token

Fungibles and non-fungibles tokens on the RChain blockchain
MIT License
19 stars 6 forks source link

purse is published in the registry? #1

Closed dckc closed 3 years ago

dckc commented 3 years ago

this code looks like it's putting a purse in the registry. So anyone can look it up and spend the REV from that purse. Am I reading this right?

https://github.com/fabcotech/rchain-token/blob/d2625ad8ee9426eec66db361d032106284194d05/src/purchaseTokensTerm.js#L102-L117

fabcotech commented 3 years ago

Great point ! Yes, a purse is in fact sent to the rchain-token contract (through the registry), two critical issues with the current code:

fabcotech commented 3 years ago

https://github.com/fabcotech/rchain-token/commit/b6854ddc9f5ea06c1fb5b669fdb4884d83673269 https://github.com/fabcotech/rchain-token/commit/2fcadb8a7480e0085b3d7cc04d319c33735157d6

Closing, you can unclose if you think there's still something wrong.

dckc commented 3 years ago

OK, so I wasn't reading the code right; the purse wasn't published in the registry. What's published in the registry is a contract where the purse is sent.