Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    paladinlll
    @paladinlll
    Jake Lin
    @JakeLin
    thanks @paladinlll I have some zil on https://api-scilla.zilliqa.com/
    evesnow91
    @evesnow91
    @JakeLin @paladinlll For the next testnet-v3 (https://api.zilliqa.com/) reboot next week, we will have the faucet ready to dispense ZILs for you guys to develop with. We will be scrapping https://api-scilla.zilliqa.com/ for developer usage.
    Jake Lin
    @JakeLin
    So which one should I use? I think should be testnet-v3 (https://api.zilliqa.com/)
    but I don't have zil on testnet-v3
    Dan Ξ
    @AndreiD
    can anyone send me some ZILs for api-scilla ? f03ececc92a157aa4c3f26de32069749f7325bac
    evesnow91
    @evesnow91
    Done
    Jake Lin
    @JakeLin
    Hey guys, I just noticed I can't send token on testnet-v3, it was OK last night
    solversa
    @solversa
    how many DAOs are already live on zilliqa ?
    Edison Lim
    @edisonljh
    @JakeLin The testnet is undergoing maintenance. We will keep you posted once it's up.
    @solversa Zilliqa is only going live in Jan 2019. So the answer is zero.
    Jake Lin
    @JakeLin
    thanks
    solversa
    @solversa
    @edisonljh How many are planned to be launched in Jan/Feb/March quarter, any idea ?
    evesnow91
    @evesnow91
    Hi @/all, the Zilliqa Maoshanwang testnet at the endpoint https://api.zilliqa.com is up.
    For future references, please use this status board to see the latest stats of the testnet.
    We are working on a faucet now for this testnet. It will be accessible soon and its status will be included in the status board soon.
    Please also do note that smaller scale (https://api-scilla.zilliqa.com) testnet has been scrapped.
    aguaholic 💧
    @DuffleBag_Dul_twitter
    need help building an app like uber but for a different puropse
    join my team?
    Dan Ξ
    @AndreiD
    why not a new facebook or a new youtube :))
    Alexander Cyon
    @Sajjon

    @/all the latest release of the iOS Wallet is using the Staging Environment FYI. I will switch back to the prod testnet once it is up.

    Anyway finally we have a name for the app - Zhip
    (working title was Zupreme).

    Download it from Testflight and after you have created (or restored) a Wallet request a payment and send me the link and I can send you some Staging testnet ZILs
    Jake Lin
    @JakeLin
    Have we changed the get balance in https://api.zilliqa.com . before, it returned a zero balance if I check an account without any Tx. But now it returns error: code: -5 data: null message: "Account is not created"
    Micky Socaci
    @mickys
    yes it seems to have been changed to return an error if the account does not have a balance
    Jake Lin
    @JakeLin
    thanks, Seems not quite right for a blockchain account for that behaviour
    evesnow91
    @evesnow91
    If the account state is not initialised, it will return that error code. This error code is mainly for debugging purposes. But Say if I had 1000 ZILs and I spent all 1000 ZILs, it will return me 0 balance.
    Jake Lin
    @JakeLin
    thanks for clarify that. In the other chain, e.g. Ethereum, it will return 0 balance without error. I will add some logic to handle that. Will it return 'code:-5' for that case? I need to use it to check and treat it as a OK case with no balance. thanks @evesnow91
    Micky Socaci
    @mickys
    @JakeLin yeah it returns an error if the account has no state, but 0 if it has 0 balance :)
    so just try / catch that
    evesnow91
    @evesnow91
    We thought it might be necessary for some applications in future.
    Jake Lin
    @JakeLin
    Hi guys, I have handled the 0 balance case, I am having another issue: when I try to send Zil using const tx = await zilliqa.blockchain.createTransaction( zilliqa.transactions.new({ version: 1, toAddr: sendTo, amount: new BN(sendAmount), gasPrice: new BN(sendGasPrice), gasLimit: Long.fromNumber(sendGasLimit), }) );
    I always got error: {code: -26, data: null, message: "CHAIN_ID incorrect"} id: 1 jsonrpc: "2.0"
    can someone give me some hint?
    I have seen this on Zilliqa-JS repo
    // These are set by the core protocol, and may vary per-chain. // These numbers are JUST AN EXAMPLE. They will NOT WORK on the public testnet // or mainnet. Please check what they are before proceeding, or your // transactions will simply be rejected. const CHAIN_ID = 88; const MSG_VERSION = 8; const VERSION = bytes.pack(88, 8);
    Jake Lin
    @JakeLin
    but don't know how to put the VERSION number
    evesnow91
    @evesnow91
    Hey @JakeLin version is a decimal conversion of the binary concatenation of both CHAIN_ID and MSG_VERSION. You will need to pack them together. You can use the Zilliqa-js util package to do so.
    const { BN, Long, bytes, units } = require('@zilliqa-js/util’);
    …
    const CHAIN_ID = 62;
    const MSG_VERSION = 1;
    const VER = bytes.pack(CHAIN_ID, MSG_VERSION);
    …
        let tx = zilliqa.transactions.new({
            version: VER,
            toAddr: 'f8c429e096abaabf43257728894d88f1142501a1',
            // Note all transactional values has to be converted to Qa (the smallest accounting unit) when using the Zilliqa protocol.
            // 1 Qa is 10^-12 Zil.
            amount: units.toQa('1000000', units.Units.Zil),  // Sending an amount in Zil and converting the amount to Qa.
            gasPrice: units.toQa('1000', units.Units.Li), // Minimum gasPrice in Li. Convert to Qa.
            gasLimit: Long.fromNumber(1),
          });
    Implementation in JS can follow @mickys format if you do not wish to use zilliqa-js utils package:
    const CHAIN_ID = 1 // MainNet ID
    const MSG_VERSION = 1 // First transaction payload version
    const version = (( CHAIN_ID << 16 ) + MSG_VERSION).toString(); // returns 65537
    Jake Lin
    @JakeLin
    I am using zilliqa-js utils package
    Jake Lin
    @JakeLin
    @evesnow91 I have follow the example you provided above, I am able to tend Zil now, but I think the example is not right, because units.toQa('1000000', units.Units.Zil) will convert a huge number
    for example, I try to send 1 zil, after amount: units.toQa(sendAmount, units.Units.Zil), it becomes 1000000000000, it means I send out 1000000000000 zil
    evesnow91
    @evesnow91
    Hey it’s fine jake this is the unit account for zilliqa. Please see this forum post: https://forum.zilliqa.com/t/gas-accounting-in-zilliqa/199
    Jake Lin
    @JakeLin
    Here is one of the payload in transactions
    {"id":1,"jsonrpc":"2.0","method":"CreateTransaction","params":[{"version":4063233,"toAddr":"399667D8c48cefBF1972F0C12eB49c8Ab995dd97","nonce":4,"pubKey":"0325304d408cf4b3e0eb9bba264c7eb78a2f54de65b608d07872f827af2d0a9b4b","amount":"1000000000000","gasPrice":"1000000000","gasLimit":"1","code":"","data":"","signature":"1d36bf20aea6cb59e224291d4cc2a07bdbe6d0c220ed3525d31bea0162f0bf1c764ed4f020c7036272059f5378aa86beac21eef4cdabe2ae90b91384eae9a227"}]}
    evesnow91
    @evesnow91
    They are in the smallest unit Qa, similar to ethereum Wei
    Jake Lin
    @JakeLin
    I understand the usage of Qa, but when I send out "amount":"1000000000000" in the payload, I send out 1000000000000 zil not 1 zil
    Micky Socaci
    @mickys
    amount: units.toQa('1', units.Units.Zil) << you send 1 zil, that is 1 000 000 LI ( 10 pow 6 ) or 1 000 000 000 000 QA ( 10 ** 12 ) :)
    Jake Lin
    @JakeLin
    I understand that
    evesnow91
    @evesnow91
    No you are sending out that amount in Qa not Zil Jake
    Jake Lin
    @JakeLin
    I am thinking the unit of amount is Qa
    evesnow91
    @evesnow91
    Yes
    Jake Lin
    @JakeLin
    But my balance deducts 1000000000000 zil
    evesnow91
    @evesnow91
    Everything to do with the protocol level is denominated in Qa. Only the users see ZILs
    Your balance is denominated in QA too