neo-project / neo-debugger

Neo Smart Contract Debugger for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ngd-seattle.neo-contract-debug
MIT License
24 stars 17 forks source link

Contract Exception: Cannot Call Method Neo.SmartContract.Manifest.ContractMethodDescriptor #194

Open ixje opened 1 year ago

ixje commented 1 year ago

I was trying to call a method on a smart contract that was not properly white listed in NEF permissions list.

The error message was not so help full

Engine State Fault: Exception has been thrown by the target of an invocation. [TargetInvocationException]
  Contract Exception: Cannot Call Method Neo.SmartContract.Manifest.ContractMethodDescriptor Of Contract 0x17dc5af926d8fcdb55e2c0a4d95433913e002423 From Contract 0xdd80e618e328203461db2d422d93d54b3f4a6cd6 [InvalidOperationException]
Gas Consumed: 0.1919967

Specifically this part "Cannot Call Method Neo.SmartContract.Manifest.ContractMethodDescriptor" should probably print the (iirc) name attribute instead

ixje commented 1 year ago

Appears to be an issue in the core, fixed by https://github.com/neo-project/neo/pull/2860