neo-project / neo-gui-2.x

MIT License
238 stars 160 forks source link

Unable to Create Custom Contract #202

Closed ch0624 closed 6 years ago

ch0624 commented 6 years ago

I was following instruction on http://docs.neo.org/zh-cn/sc/tutorial/Lock2.html

When I try to import custom contract, this Unhandled Exception appears.

I am using windows 10 and have generated the contract file using visual studio 2017.

Could someone help?

jrsikors commented 6 years ago

what unhandled exception? Can you post details?

ch0624 commented 6 years ago

Hi jrsikors, thanks for the help. Please see the screenshot below.

This window pops up when I tried to create new contract.

error window

jrsikors commented 6 years ago

unfortunately I don't have a lot of knowledge with smartcontracts. The key part of the error message is in the first couple lines:

"Value doesn't fall within the expected range" "Neo.Wallets.Keypair..ctor(Byte[] privateKey"

So -- if I had to guess .. it doesn't seem to like something that has to do with the steps... byte[] b = HexToBytes("0285eab65f4a0126e4b85b4e5d8b7e303aff7efb360d595f2e3189bb90487ad5aa"); byte[] bytes = System.IO.File.ReadAllBytes("Test.avm");

jrsikors commented 6 years ago

In this step in the code .. are you putting in the Public Address like this? byte[] b = HexToBytes("0285eab65f4a0126e4b85b4e5d8b7e303aff7efb360d595f2e3189bb90487ad5aa");

Are your values in test.avm good?

jrsikors commented 6 years ago

Were you able to ever figure this one out? Or still same problems and looking for help ?

Relfos commented 6 years ago

I've found a similar problem, happens when your AVM fiile is quite large and when you paste it into this window, part of it gets cut off