Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    That is confusing.
    image.png
    kishankumar258
    @kishankumar258

    Hi, In the python api scripts for zilliqa to create transaction what do I set the chain to in "set _active _chain" if I am running a local network .
    from pyzil.crypto import zilkey
    from pyzil.zilliqa import chain
    chain.set_active_chain(chain.MainNet)

    my_key = zilkey.ZilKey(private_key="**")

    payload = {
    "to_addr": "4baf5fada8e5db92c3d3242618c5b47133ae003c",
    "amount": "1000000000000",
    "gas_price": "1000000000",
    "gas_limit": 1,
    "code": "",
    "data": "",
    "priority": False,
    }

    params = chain.active_chain.build_transaction_params(my_key, **payload)
    txn_info = chain.active_chain.api.CreateTransaction(params)
    print(txn_info)

    I understand I could use this way " new_api = ZilliqaAPI(endpoint="http://localhost:4201") " but in the github file of pyzil I did not get the script for creating transaction locally.
    I have raised a github issue for the same at deepgully/pyzil#4 .
    Please help.
    evesnow91
    @evesnow91
    You have to pack the bytes for VERSION I think
    This is how you do transaction @kishankumar258
    https://github.com/deepgully/pyzil#zils-transaction
    evesnow91
    @evesnow91
    LocalNet = BlockChain("http://localhost:4201",
                         version= 131073, network_id= 2)
    Then:
    chain.set_active_chain(chain.LocalNet)
    kishankumar258
    @kishankumar258
    Should not the network id be "2" as received as the output of "new_api.GetNetworkId()"
    evesnow91
    @evesnow91
    Yep
    Changed it
    kishankumar258
    @kishankumar258
    Thanks
    evesnow91
    @evesnow91
    packed bytes of (2,1) is 131073
    gas in Ethereum is gasLimit*gasPrice
    @albertschr
    kishankumar258
    @kishankumar258

    @evesnow91 After doing this I get this error
    chain.set_active_chain(chain.LocalNet)
    AttributeError: module 'pyzil.zilliqa.chain' has no attribute 'LocalNet'

    I had forked the pyzil repo made changes and then setup pyzil.

    neeboo
    @neeboo
    @albertschr cumulative_gas is the gas amount that consumed.
    Edison Lim
    @edisonljh
    @albertschr This might help. Just implemented yesterday. https://dev-wallet.zilliqa.com/calculate
    李大狗
    @leeduckgo
    thxs a lot
    unostore
    @unostore
    hi, love this project and trying to understand the code. In the new mainnet, they use bech32 for the address. Can someone point out to me in which file they appended the zil prefix to the address. thanks!
    unostore
    @unostore
    @AmritKumar thank you so much!
    kishankumar258
    @kishankumar258
    What is the checksum address in zilliqa local network?
    I am able to get the address of a node from the zilliqa logs in the local run folder and also able to check balance ( using GetBalance) for this addresss associated with a node, but, while sending transactions it shows as an invalid checksum address .I tried prepending "0x" to the address but that also shows as an invalid address. Is it something else for the local network, or do I need to do something else in this case. I am using the python client pyzil.
    evesnow91
    @evesnow91
    # to_addr must be bech32 address or 20 bytes checksum address
    to_addr = “zil1k5xzgp8xn87eshm3ktplqvs9nufav4pmcm52xx"
    李大狗
    @leeduckgo
    I met a problem when I am going to sign the transaction with Zilliqa.
    Because the schnorr signature don't had library in language I using.\
    image.png
    So, is it necessary to sign Transction with Schnorr signature, or something else is Okay?
    Because BCH is using schnorr too and the traditional signature is valid, too.
    evesnow91
    @evesnow91
    BCH Schnorr implementation is diff from Zilliqa's
    What language are you using?
    李大狗
    @leeduckgo
    Elixir🤣
    Can I using this library?
    Bitcoin-ABC libsecp256k1 with Schnorr signatures
    neeboo
    @neeboo
    @albertschr I think the way zilliqa making schnorr is different with Bitcoin-ABC
    you can try and make one yourself
    Cameron Sajedi
    @csajedi
    @jeremyid is there a zilliqa discord? I didn't know, and it's not on the zilliqa homepage
    evesnow91
    @evesnow91
    @albertschr What language are you using?
    I think so far we have JS, Python, Go, Ruby, C#, C++, Swift implementations.
    李大狗
    @leeduckgo
    Thxs.
    kishankumar258
    @kishankumar258
    How do I know the time for a transaction to be complete? I need the transaction time.
    J. SK
    @JSSS
    guys, how do you like scilla/ zil stack so far? I'm new here
    Edison Lim
    @edisonljh
    I eat scilla for breakfast.