Moonlight Contract Migration — A Decentralized Technique

A
Moonlight.io
2 min readSep 9, 2019

--

The Moonlight team will be updating the Moonlight Lux (LX) Smart Contract in the near future in order to address a technical issue. The fix will be committed to our Moonlight ICO template repository on Github afterwards. We have asked exchanges such as Switcheo to halt trading, deposits, and clear unfilled trades until we have addressed this issue. Moonlight Lux (LX) will be relisted on Switcheo Exchange soon after the update. Furthermore, the update will allow us to support integrations with Nash, where we will also be listed. The update will be deployed immediately following confirmation from the Nash team that they have tested our revised smart contract and established that it works with respect to their exchange features.

The contract will be redeployed to MainNet using the NEO framework method Contract.Migrate. This will move all contract storage data (such as balances and transactions) to a new script hash, immediately destroying the old LX scriptHash bb3b54ab244b3658155f2db4429fc38ac4cef625.

If the wallet you use supports the standard Contract.Migrate functionality, there should be no issue on your end. However, if your wallet must be manually updated with scriptHashes, it will display a balance of 0 until the new scriptHash is entered, either manually or through an update to the wallet itself. As for NEO blockchain explorers, most determine the balance to display by listening to Transfer events broadcast on the blockchain. However, there is still a wide amount of variance between them, so there may be differences in how they each individually handle contract migrations.

The alternative approach would be for us to redeploy the LX contract to MainNet without using Contract.Migrate — instead, doing an airdrop, so everyone gets back to their snapshot balance. However, we integrated contract migration support during the design phase of our contract so that if situations such as this arose we could handle it without breaking our promise to vest our tokens for the stated period of time but, more importantly, without taking control of our community’s tokens!

Thank you for your support,

Your Moonlight Team.

--

--