neo-project / docs

NEO Documentation
http://docs.neo.org
Creative Commons Attribution 4.0 International
195 stars 284 forks source link

getting-started-csharp-mac.md, compile success, deploy fails #926

Closed zzo11 closed 5 years ago

zzo11 commented 5 years ago

Followed instructions in the documentation. avm file was successfully compiled with indicators:

Neo.Compiler.MSIL console app v2.4.1.0 Find entrypoint:System.Boolean Main.SmartContracts.AContract::Main(System.String,System.Byte[]) convert succ gen abi succ write:SmartContract.avm write:SmartContract.abi.json SUCC Executing: mv SmartContract.avm //neo-local/smart-contracts/SmartContract.avm

However when deploying to neo-local private blockchain via neo-python. Contract fails to execute. See below errors [D 190911 23:25:33 ApplicationEngine:372] Exception calculating gas consumed 'utf-8' codec can't decode byte 0xcf in position 0: invalid continuation byte [I 190911 23:25:33 EventHub:58] [test_mode][SmartContract.Execution.Fail] [b29948e9150d5364ab286e7e09049d7292618379] {'type': 'Array', 'value': [{'type': 'String', 'value': 'Execution exited in a faulted state. Any payload besides this message contained in this event is the contents of the EvaluationStack of the current script context.'}, {'type': 'ByteArray', 'value': b'No operation ran'}]}

zzo11 commented 5 years ago

Found issue was related to dotnet Neo compiler command in documentation:

dotnet neon.dll <your smart contract.dll> Contract succesfully deployed with additional compatible option i.e. dotnet neon.dll <your smart contract.dll> --compatible

zzo11 commented 5 years ago

Pull request available for documentation update to fix this issue