01 October 2018

All You Need To Know About NEO Global Development’s CGAS And CNEO

NEO Global Development (NGD) is responsible for the development of the contract assets of CGAS and CNEO which map the global assets of GAS and NEO into their respective equivalent NEP-5 smart contracts. CGAS and CNEO were developed by NGD because the global assets of GAS and NEO (UTXO assets of NEO) are not readily compatible with smart contracts.

It was developed by NGD to provide the community with a viable alternative to using GAS or NEO in smart contracts. As a developer you can now swap your GAS or NEO to a corresponding NEP-5 alternative at a rate of 1 to 1 and be able to fully tap into their smart contract function as well as utilise both the GAS and NEO cryptos under a variety of dApps.

You can get to learn more about the CGAS and CNEO from NGD in this article. Below are some questions and answers that may interest you.

Q1: Why was CGAS and CNEO created by NGD?

A1: According to NGD, UTXO assets are not open sourced and compatible with smart contracts. However, both CGAS and CNEO are decentralised as well as open sourced. There are also no constraints to the use of these contract assets and they are highly compatible with the smart contracts of a variety of blockchain projects.

Q2: Does the “C” in CNEO or CGAS have any meaning?

A2: According to NGD, the “C” in CGAS and CNEO simply stands for “Contract”.

Q3: Do CGAS and CNEO have similar contract logic?

A3: Both the external interfaces and the internal logic of CGAS and CNEO are the same with the exception of the contract name and ID of the mapped asset which are different.  

Q4: How are global assets (i.e. GAS and NEO) mapped by CGAS and CNEO respectively?

A4: GAS and NEO which are global assets are either exchanged or returned by two functions namely; the “mintTokens” and the “refund”. With the “mintTokens” there is a conversion ratio of 1 to 1, where global assets are converted to contract assets which can then be utilised for smart contracts. On the other hand the “return” function enables users to convert contract assets (i.e. CGAS and CNEO) back to UTXO assets (i.e. GAS and NEO) and then have the contract assets transferred to their respective addresses.

Q5: What projects are presently making use of CGAS and CNEO?

A5: Some of the blockchain projects utilising (or intending to utilise) CGAS and CNEO include; Alchemint, NewEconoLab’s Neo Name Service (NNS), nOS and crazy gladiator games by BlaCat.

Q6: Are CGAS and CNEO currently supported by wallets?

A6: At the moment those projects utilising CGAS and CNEO are responsible for both the exchange and return of the contract asset functions for their respective projects. However, the R&D team of O3 is currently working on a mobile wallet that will fully support CGAS and CNEO contract assets.

Q7: What versions are available for CNEO?

A7: Currently there is just a single version for CNEO and this version is CNEO v1.0.3. The reason why there is one version at the moment is because the release of CNEO is dependent on the smooth, stable and seamless operation of CGAS.

Q8: Why does CGAS have several versions?

A8: There are currently three versions of CGAS namely; CGAS v1.0.1, CGAS v1.0.2 and CGAS v1.0.3. With the first version, the transferAPP functionality which is a transfer function that is invoked by a different contract is in no way standardised. According to NGD, both the transferAPP function and transfer function have been combined, the interface of the transferAPP has been taken off with logical decisions made under the method with the amount of script lines effectively reduced as a consequence.

For CGAS v1.0.2, the transfer method has a code which effectively negates the springboard call. Therefore the transfer function cannot be called via the contract. However, users will not lose their respective assets because of this bug and NGD has also fixed the problem with the release of CGAS v1.0.3. The CGAS v1.0.3 is presently in operation without any issues or bugs encountered.

Q9: With the latest CGAS available, can other earlier versions be utilised?

A9: NGD advises members of the community to make use of CGAS v1.0.3 which is the latest CGAS version. However, anyone that is currently utilising the older versions can make use of the “refund” function. You can convert your CGAS contract asset to GAS global asset before upgrading to the latest version of CGAS, there will be no loss of your assets if you do.

Important Notes For Developers:

  • As a developer making use of CGAS and CNEO you should note that the InvocationTransaction Inputs as well as Outputs should be less than or equal to 60 whenever mintTokens are utilised, if this is not the case the implementation fee will be more than the 10 GAS which is free. Where large amounts of UTXO assets are required to substitute CGAS or CNEO, NGD advises that a normal transfer be done, then you should combine the UTXO assets before executing mintTokens.
  • Any negligence in the construction of a transaction, no matter how little it may be, can result in transaction verifiation failure. This is because the contract logic for both CGAS and CNEO is much more complex. Developers are therefore advised to properly study the contract logic before they attempt to construct a transaction.
  • The scriptHash for CGAS and CNEO are as follows;
  1. ScriotHash for CGAS v1.0.3: 0x74f2dc36a68fdc4682034178eb2220729231db76
  2. ScriptHash for CNEO v1.0.3: 0xc074a05e9dcf0141cbe6b4b3475dd67baf4dcb60

Contact Address for CGAS and CNEO;

  • The CGAS Contract Address is:
  • The CNEO Contract Address is:

GitHub Address for CGAS and CNEO;

– The GitHub Address for CGAS is: https://github.com/neo-ngd/CGAS-Contract

– The GitHub address for CNEO is: https://github.com/neo-ngd/CNEO-Contract

In Closing

NEO Global Development (NGD) has also released their monthly progress report for the month of September, 2018. You can find details of this report by clicking on this link.

Leave Comment

Your email address will not be published. Required fields are marked *