neb.py
neb.py copied to clipboard
what's wrong?
{"result":{"balance":"0","nonce":"0","type":87}} {'result': {'type': 87, 'nonce': '0', 'balance': '0'}} {"error":"cannot found contract account in storage please check contract address is valid or deploy is success"}
please make sure where is your smart-contract is deployed: mainnet or testnet?
>>> from nebpysdk.src.client.Neb import Neb
>>> net = Neb('https://mainnet.nebulas.io')
>>> from wakuang/config import ConfigOne as conf
File "<stdin>", line 1
from wakuang/config import ConfigOne as conf
^
SyntaxError: invalid syntax
>>> from config import ConfigOne as conf
>>> net.url
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Neb' object has no attribute 'url'
>>> net
<nebpysdk.src.client.Neb.Neb object at 0x7f31071dd710>
>>> dir(net)
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'admin', 'api', 'set_request']
>>>
>>> dir(net.api)
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_api_version', '_host', '_path', 'call', 'create_url', 'estimateGas', 'gasPrice', 'getAccountState', 'getBlockByHash', 'getBlockByHeight', 'getDynasty', 'getEventsByHash', 'getNebState', 'getTransactionByContract', 'getTransactionReceipt', 'latestIrreversibleBlock', 'sendRawTransaction', 'send_request', 'set_request', 'subscribe']
>>> net.api._host
'https://testnet.nebulas.io'
new version has solve this problem?
also,,,,,chain_id == 1101 is invalid??? thanks .........
i can't change chain_id how to do it????
For mainnet, chain_id = 1 For testnet, chain_id = 1001