Smart contracts support to be updated or destroyed after release. Before you can do that you need to implement the Update and Destroy interfaces in the old contracts.
Contract Update
In some cases you want to upgrade the smart contracts deployed on the blockchain or migrate the storage of a contract into another new contract, you need to update smart contracts. Neither the contract hash nor the storage is changed when the contract is upgraded.
Implementing the Update interface
To enable the update function, you need to implement the Update method in the contract. In the contract template this method has been implemented by default, as follows:
If you want to update the contract later, you must implement the update method in the contract prior to deployment. For more information, refer to Deploying and Invoking Smart Contracts .
For information about invoking the contract, refer to Invoking contracts .
After the update method is executed, the contract is upgraded and neither the contract hash nor the storage area is changed.
Contract Destruction
To destroy a contract, you need to reserve the destruction method in the contract.
To use the contract destroy feature, you need to implement the destroy method in the original contract. The destroy method has been implemented by default in the contract template as follows.
The Destroy method takes no arguments. When it is invoked, the contract and its storage, if any, are deleted. Then the contract is no longer available.
The minimum unit of NEO is 1 and tokens cannot be subdivided. GAS is the fuel token for the realization of Neo network resource control, with a maximum total limit of 100 million.
The NEO project's blockchain is designed to digitize identities and assets and use smart contracts to track and transfer ownership—a smart economy. NEO originally described its smart economy system as: Digital Assets + Digital Identity + Smart Contract = Smart Economy.
Neo is based on the Proof of Stake protocol in combination with delegated Byzantine Fault Tolerance. NEO can be staked by anyone on the network to receive voting power for participation in the network governance that runs on the combination of PoS and dBFT protocols.
Neo was founded by Da Hongfei and Erik Zhang in 2014 under the name Antshares. The original source code was published to GitHub in July 2015 and the MainNet subsequently launched in October 2016. In 2017, Antshares was rebranded to Neo as it implemented Smart Contracts 2.0.
Address: Apt. 171 8116 Bailey Via, Roberthaven, GA 58289
Phone: +2585395768220
Job: Lead Liaison
Hobby: Lockpicking, LARPing, Lego building, Lapidary, Macrame, Book restoration, Bodybuilding
Introduction: My name is Sen. Ignacio Ratke, I am a adventurous, zealous, outstanding, agreeable, precious, excited, gifted person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.