Coder Social home page Coder Social logo

what's wrong? about neb.py HOT 6 OPEN

nebulasio avatar nebulasio commented on June 16, 2024
what's wrong?

from neb.py.

Comments (6)

yupnano avatar yupnano commented on June 16, 2024

please make sure where is your smart-contract is deployed: mainnet or testnet?

from neb.py.

CCColby avatar CCColby commented on June 16, 2024
>>> 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'

from neb.py.

CCColby avatar CCColby commented on June 16, 2024

new version has solve this problem?

from neb.py.

CCColby avatar CCColby commented on June 16, 2024

also,,,,,chain_id == 1101 is invalid???
thanks .........

from neb.py.

CCColby avatar CCColby commented on June 16, 2024

i can't change chain_id
how to do it????

from neb.py.

yupnano avatar yupnano commented on June 16, 2024

For mainnet, chain_id = 1
For testnet, chain_id = 1001

from neb.py.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.