How to write smart contracts in C# on ubuntu
To develop smart contracts in C# on ubuntu, basically you need to do the following:
-
Create a library project, write code, and add the smart contract library.
-
Execute
neo-compiler/neon
to generate the compiler. -
Run
neon
to generate the .avm file.
Create a smart contract project
-
In the dotnet command line, create a library project:
-
In NeoContractDemo.cs, enter the following code and then press
ESC
+wq!
. -
Add the smart contract reference:
-
Compile the smart contract project:
Generate the compiler
Generate the .avm file
For complete scripts, refer to https://raw.githubusercontent.com/hunjixin/NeoContractBuildScriptOnUbuntu/master/SmartContract.sh