neo-devpack-java icon indicating copy to clipboard operation
neo-devpack-java copied to clipboard

Clarify NEO smart contract java development

Open peterszatmary opened this issue 7 years ago • 4 comments

I was not able to create hello world smart contract with neo-devpack-java.

  1. maybe documentation is old
  2. or in neo-devpack-java are some java files missing

Documentation tells us to extends our smart contracts with FunctionCode or VerificationCode.

Example from doc

import AntShares.SmartContract.Framework.FunctionCode;
import AntShares.SmartContract.Framework.Services.AntShares.Storage;

public class HelloWorld extends FunctionCode{
    public static byte[] Main(String[] args){
        Storage.Put(Storage.getCurrentContext(), "Greeting to the World", "Hello World!");
        return Storage.Get(Storage.getCurrentContext(),"Greeting to the World");
    }
}

Neo-devpack-java doesnt contain this files.

Link to Antshares.SmartContract.Framework JAR by documentation is broken.

I found one issue telling that Antshares.SmartContract.Framework JAR is compiled from neo-devpack-java.

If so than above mentioned documentation is old or neo-devpack-java is missing java files.

peterszatmary avatar Oct 11 '17 11:10 peterszatmary

Yes, the documentation is old.

erikzhang avatar Oct 11 '17 12:10 erikzhang

Can i somehow help with the documentation ?

peterszatmary avatar Oct 11 '17 14:10 peterszatmary

Yes, of course. You can make pull requests at https://github.com/neo-project/docs

erikzhang avatar Oct 11 '17 14:10 erikzhang