15 things you should know about CNEO and CGAS

Neo
Neo
Sep 29, 2018 · 5 min read
Image for post
Image for post

1. What is CNEO and CGAS

CNEO and CGAS are NEP-5-compliant contract assets issued by NGD (NEO Global Development), which can be exchanged one to one by the global asset NEO / GAS. The purpose of the contract is to map to the global assets, so that the global asset NEO / GAS can be easily transferred inside the contract, allowing the transfer of funds from the smart contract.

2. Why release CNEO and CGAS

Because there is a demand for many DApps project on NEO for a digital asset with strong liquidity and relatively stable price to be used within the contract. However, due to the limitations and security considerations of NEO smart contracts, it is not possible to transfer global assets (such as NEO or GAS) into smart contracts. Also, whenever any project issues a NEP-5 token for that contract, the community might not recognize its token or exchanges are not willing to list it for circulation. As such, it is costly for the project. The community then recommended to the NGD team to issue a NEP-5 asset pegged to NEO /GAS. As such, for the unified use for the community, CNEO and CGAS were born.

3. How does CNEO and CGAS map global assets?

In CNEO and CGAS, the global assets are exchanged and returned through “mintTokens” and “ refund” function. The “mintTokens” function is similar to the Token Sale code for many projects, with a 1:1 conversion of global and contract assets within the function. In the “return” function, a user who has previously marked a UTXO as a designated user can retrieve it, and then the user can initiate a transfer to transfer the asset to its own address. More details can be found in GitHub. This design concept was proposed by the NEL team and implemented in open source code.

4. Is the contract logic of CNEO and CGAS the same?

The internal logic and external interfaces are identical. The only difference is the contract name and the mapped asset ID.

5. What does C in CGAS mean?

Contract.

6. What is the relationship between CGAS and SGAS?

SGAS is the mapping of GAS developed by the NEL team in contract assets. It is the predecessor of CGAS. Based on SGAS, CGAS has carried out code refactoring, bug fixes and interface modification, and then renamed to CGAS. Another reason for the change of name is that the English pronunciation of SGAS is misleading. Currently deployed on the main network, SGAS is deployed by BlaCat as a temporary use before the release of CGAS. After the deployment of CGAS, they will deprecate the original SGAS and use CGAS.

7. There are contract assets that map global assets which have been developed by community projects. Why does NGD develop CGAS and CNEO?

It is understood that the community’s mapping of global assets is not open source and may PERHAPS not be trustable. The CGAS and CNEO developed by NGD are open source, decentralized, and have no usage restrictions, and can be used by any project.

8. What is the script Hash of CNEO and CGAS, where is the source code?

CGAS 1.0.3

CNEO 1.0.3

GitHub address:

9. Which projects are using CNEO and CGAS

There are currently NEL’s NNS, BlaCat’s crazy gladiator games, Alchemint , and nOS that are already using or planning to use CNEO or CGAS.

10. Is there a wallet that supports CNEO and CGAS?

According to Apisit, one of the founders of the O3 team, has said that O3 is developing support for CNEO and CGAS and is expected to be FULLY available soon. In addition to community wallet support, project owners using CNEO and CGAS will also facilitate the redemption and return of CNEO and CGAS functions for their projects.

11. Why are there multiple versions of CGAS

In the first version of CGAS (1.0.1), there was a problem with the transferAPP function (a transfer function called by another contract) that was not standardized. The English speaking community developers thought it should be named transferApp. We studied and decided to merge the transfer function and the transferAPP function, remove the transferAPP interface, and make logical decisions inside the method, thus reducing the number of script lines.

12. Can the old CGAS still be used?

Currently there are 3 versions of CGAS, 1.0.1, 1.0.2 and 1.0.3, and the latest version is 1.0.3. We recommend that the community use the latest version of CGAS. If you have used the old version of CGAS, don’t worry, you can use the refund command. Converting CGAS to GAS and then migrating the CGAS version will not result in asset loss.

13. How many versions does CNEO have?

CNEO currently has one version — version number 1.0.3, because CNEO is released after CGAS runs stably.

14. Will CNEO get GAS or CGAS?

No, because the amount of GAS generated by the global asset NEO cannot be calculated within the contract. Decentralized implementation has many unsolvable difficulties, and centralized implementation will greatly increase the complexity of the contract. It makes the contract become bloated, the storage amount becomes huge, and the administrator rights is too large, as such there is also the risk of abuse of power. Hence, GAS cannot be extracted. Since holding CNEO will not get GAS or CGAS, if a project needs this feature, they can Fork CNEO’s code to implement a centralized solution on its own.

15. What should developers pay attention to when using CGAS/CNEO

1. Fees. When you use mintTokens, please note that the Inputs and Outputs of InvocationTransaction should not exceed 60. Otherwise, the fee required for execution will exceed the free 10 GAS. If a large number of NEO / GAS UTXOs needs to be replaced by CNEO or CGAS, it is recommended to make a normal transfer, merge UTXO, and then perform mintTokens.



Neo Smart Economy

Neo is an open-source, community driven platform that is…

Neo

Written by

Neo

Neo Blockchain official Medium. For official Twitter feed:https://twitter.com/NEO_Blockchain

Neo Smart Economy

Neo is an open-source, community driven platform that is leveraging the intrinsic advantages of blockchain technology to realize the optimized digital world of the future. https://neo.org/

Neo

Written by

Neo

Neo Blockchain official Medium. For official Twitter feed:https://twitter.com/NEO_Blockchain

Neo Smart Economy

Neo is an open-source, community driven platform that is leveraging the intrinsic advantages of blockchain technology to realize the optimized digital world of the future. https://neo.org/

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store