Comments (8)
please describe the exact commands you used to build and deploy and to which network (private net, testnet?). It sounds like you're either doing a test invoke without actually permanently deploying the contract to a chain, or your local chain is out of sync.
from neo-python.
1- sc build
2 - sc deploy True False False etc....
I get no errors.
Everything happens the same as deploying another smart contract but not NEP-5 .
using private_net.
from neo-python.
which exact neo-python
version are you using? You can type np-prompt --version
assuming you followed the default installation instructions. Otherwise try cat neo/__init__.py
from neo-python.
I'm using neo-local , it always pulls the latest neo-python.
And I've imported neo-boa v 0.6.0 to my python project .
from neo-python.
Same issue here, today. It seems everything is fine, but the contract just wont get deployed.
I am using the docker image: docker run --rm -d --name neo-privatenet -v /home/.../mynep5/:/neo-python/sc -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp cityofzion/neo-privatenet
I can run things with sc build_run ....
like:
sc build_run sc/mynep5.py True True False 0710 07 name [] --owners=["myPrivTestnetAddr"]
sc build_run sc/mynep5.py True True False 0710 01 noop [] --owners=["myPrivTestnetAddr"]
sc build_run sc/mynep5.py True True False 0710 01 noopowner [] --owners=["myPrivTestnetAddr"]
(noop and noopowner just return True, noopowner does a checkwitness check before)
But I cannot make neopy
deploy that contract to privtestnet. I can transfer neo and gas from the "generic coz-privkey" to my myPrivTestnetAddr.
One weird thing: I have 32k gas in the privtestnet, but once I deploy twice, any third attempt will fail with "insufficient funds", but checking wallet
there was nothing deducted. Wiping and restarting the container "fixes" it by granting me another 2 deploys.
Unsure how to debug.
Also out of frustration I tried to get my nep5token deployed on public testnet with neo-cli. That worked without any confirmation and I can call unprivileged functions on testnet.
Another issue is: I cant manage to use neo-cli to call functions that use checkWitness
. There is one single example that feeds some scripthashes and some address to a transfer function, but reproducing that with what I think it means (yay docs! -.-) doesnt work.
invoke 0x... noop []
works.invoke 0x... noopowner []
fails and I have not seen any way to turn any debugging features up.
This all needs not more examples - there are examples everywhere - but a good written one that explains the non-obvious constraints and assumptions and how to turn on debugging everywhere.
from neo-python.
-
Have you tried attaching extra gas on the deploy transaction? Shouldn't be required but worth a try.
-
For your checkwitness problem you'll have to add a transaction attribute. See
neo-python/examples/build_raw_transactions.py
Lines 170 to 173 in f343df6
-
As for the double/triple deploy. I've not heard of that before, but you could try running the
wallet rebuild
command -
For turning on debugging from the neo-python side type
config help
. It can turn on network logging, results from the virtual machine processing etc. Now this will not help you if the transaction is rejected by the consensus nodes in your private net. Honestly the only way to debug why it is rejected by consensus nodes is to debug the consensus node itself. My personal way of doing that would be setup a single consensus node (solo mode) from source and debug from there. There just isn't a friendly way of doing it.
from neo-python.
- Have you tried attaching extra gas on the deploy transaction? Shouldn't be required but worth a try.
no. how would I do that with neopy or neo-cli?
- For your checkwitness problem you'll have to add a transaction attribute. See
neo-python/examples/build_raw_transactions.py
Lines 170 to 173 in f343df6
I later managed to do that with neoline on pubtestnet, but I failed to do that with neopy and neo-cli. how would I do that with those?
- As for the double/triple deploy. I've not heard of that before, but you could try running the
wallet rebuild
command
created container, opened wallet, waited 15 min, ran wallet rebuild
, waited 15 min.
still only 2 deploys, that wont actually deploy, the 3. one will fail with insufficient funds.
from neo-python.
- Have you tried attaching extra gas on the deploy transaction? Shouldn't be required but worth a try.
no. how would I do that with neopy or neo-cli?
For neo-cli ask on the neo-cli repo. I don't know. For neo-python, use --attach-gas
when invoking (see sc invoke help
).
- For your checkwitness problem you'll have to add a transaction attribute. See
neo-python/examples/build_raw_transactions.py
Lines 170 to 173 in f343df6
I later managed to do that with neoline on pubtestnet, but I failed to do that with neopy and neo-cli. how would I do that with those?
use --tx-attr
when invoking. Again see sc invoke help
it has an example in the help description. the "usage"
value should be 0x20 and the "data" has to be 20 bytes long because it expects to convert it to a UInt160
neo-python/neo/Core/TX/Transaction.py
Lines 716 to 720 in f343df6
The conversion part is called by this
neo-python/neo/SmartContract/StateReader.py
Line 200 in f343df6
- As for the double/triple deploy. I've not heard of that before, but you could try running the
wallet rebuild
commandcreated container, opened wallet, waited 15 min, ran
wallet rebuild
, waited 15 min.still only 2 deploys, that wont actually deploy, the 3. one will fail with insufficient funds.
Sorry, no idea what is going on there then.
from neo-python.
Related Issues (20)
- Circular map reference causes Python stack overflow
- Docker build exits with errors HOT 9
- Parser breaks when reading --tx-attr argument with spaces HOT 3
- Privatenet fails to initialize HOT 2
- neo-python can't sync with Neo 2.10.3 nodes HOT 1
- Deploy Neo Smart Contract at runtiime. HOT 5
- Wallet & np-api-server issues HOT 2
- BigInteger ToByteArray incompatible with neo-vm v3.0.0 HOT 1
- Unclaimed gas calculation incorrect HOT 6
- docker 只有Ubuntu的吗,在centos上运行出错
- centos7下,运行np-prompt,卡顿后后,ctrl + z 退出后,再此运行np-prompt,报错 HOT 1
- 运行np-prompt后,prompt.log中报错, HOT 1
- 运行np-prompt后,没有出现NEO命令行
- Connect to node problem HOT 2
- TestNet bootstrap HOT 1
- prompt input parser parses nested lists incorrectly HOT 1
- Simple Policy Plugin HOT 6
- np-bootstrap -c configure my local sync node that haved sync and the block data is finish. HOT 1
- np-bootstrap hangs at confirm prompt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neo-python.