pinknetworkx / atomicassets-contract

Smart Contract of the AtomicAssets standard.
MIT License
149 stars 88 forks source link

Refactors the use of contract instance variables #29

Closed dallasjohnson closed 4 years ago

dallasjohnson commented 4 years ago

They are now defined in the contract constructor and the singletons are saved in the destructor. This simplifies access to instance variables, particularly the singletons.

This also prevents potential bugs caused by forgetting to save or, worse, have inconsistent instances of the singleton that save over each other from different internal functions that may be called by contract actions now or in the future.

In making these changes I noticed a significant security hole in the contract that needs some futher work but I thought this is not the right place to highlight them. What is your preferred comms platform for such matters?

jona-wilmsmann commented 4 years ago

Please contact me on telegram, you can join our group here https://t.me/atomicassets and find me there.

jona-wilmsmann commented 4 years ago

As discussed, I'm closing this due to concerns over readability and performance.