Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Wayne Chiu
    @CHAOWEICHIU
    what you were trying to do with Web3(HTTP_PROVIDER)

    @cyriacr

    how do I add icon to drc-20 in dexon?

    For ethertum network, you will add custom icon by making a PR at https://github.com/MetaMask/eth-contract-metadata.

    As for DEXON, it is currently at its testing network phase. DEXON team still deciding the best for uploading icon and will surely have this mechanism ready with Mainnet Launch

    Eddie Lien
    @cyriacr
    @CHAOWEICHIU I have a program on server side, it controls some states of my contract, such as game on-and-off state.
    my transactions
    my contract
    Wayne Chiu
    @CHAOWEICHIU
    where is truffleWallet coming from?
    Eddie Lien
    @cyriacr
    i use the same settings in truffle, that is, truffle-config.js
    const truffleWallet = require('../truffle-config')
    Wayne Chiu
    @CHAOWEICHIU
    what network did you provide ?
    Eddie Lien
    @cyriacr
    dexonTestnet for testnet, and development for local ganache
    Wayne Chiu
    @CHAOWEICHIU
    how is your truffle-config look like?
    Eddie Lien
    @cyriacr
    
    var HDWalletProvider = require('truffle-hdwallet-provider')
    const secret = require('./secret')
    const mnemonic = secret.mnemonic
    
    module.exports = {
      networks: {
        development: {
          provider: () => new HDWalletProvider(
            mnemonic,
            'http://127.0.0.1:8545',
            0,
            3,
            true,
            "m/44'/237'/0'/0/"
          ),
          network_id: '*',
          host: 'localhost',
          port: 8545
        },
        /**
          DEXON Testnet
        */
        dexonTestnet: {
          provider: () => (
            new HDWalletProvider(
              mnemonic,
              'http://testnet.dexon.org:8545',
              0,
              1,
              true,
              "m/44'/237'/0'/0/"
            )
          ),
          network_id: '*'
        }
      }
    }
    Wayne Chiu
    @CHAOWEICHIU

    where did you catch?

    Error: Transaction was not mined within750 seconds, please make sure your transaction was properly sent.

    Eddie Lien
    @cyriacr
      spin: async function (gameid) {
        try {
          await this.masterWrite.methods.Roulette_spin(gameid, 0).send({ from: this.userdata.addr, gas: this.gasFee })
        } catch (error) {
          // error.reason now populated with an REVERT reason
          console.log(Date.now(), 'Failure reason', error.reason)
          console.log(Date.now(), error)
        }
      }
    something like this function do, but all these functions worked fine at first hours. perhaps node side problem?
    Wayne Chiu
    @CHAOWEICHIU

    @cyriacr

    I guess it might be the reason of the fee of gas is too low?

    Eddie Lien
    @cyriacr
    or testnet under maintainness?
    Wayne Chiu
    @CHAOWEICHIU

    @cyriacr I think it is possible

    are you still getting the same error right now?

    Eddie Lien
    @cyriacr
    not today
    2019-02-11 05:00:00    Error: Invalid JSON RPC response: ""
    same message occurred 3 times
    
    2019-02-11 05:00:28 Error: insufficient funds for gas * price + value
    same message occurred multiple times until
    2019-02-11 05:31:15 Error: insufficient funds for gas * price + value
    
    2019-02-11 05:31:29    OK
    i think these errors should be caused by testnet maintainness
    Eddie Lien
    @cyriacr
    2019-02-08 17:46:55 'network' 'dexonTestnet' 'netid' 238
    everything is fine...
    
    2019-02-09 06:03:12 Error: Transaction was not mined within750 seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!
    multiple errors until
    2019-02-09 10:38:41 Ctrl-C terminate program
    Wayne Chiu
    @CHAOWEICHIU
    did you manage the nonce yourself?
    Eddie Lien
    @cyriacr
    I don't know how to do that, shouldn't truffle-hdwallet do that for me?
    Wayne Chiu
    @CHAOWEICHIU
    yeah, it is better to let truffle-hdwallet do it for you
    Eddie Lien
    @cyriacr
    the only nonce problem I encountered is having 2 or more bots using the same wallet
    Wayne Chiu
    @CHAOWEICHIU
    what do you mean by 2 bots?
    like you have two servers that are using the exact same account?
    Eddie Lien
    @cyriacr
    yes
    Wayne Chiu
    @CHAOWEICHIU
    I would suggest to use different accounts
    unless you can make you don't use those two accounts at the same time
    Eddie Lien
    @cyriacr
    yes, i was busy in creating accounts for different bot programs this morning :-)
    Wayne Chiu
    @CHAOWEICHIU
    awesome!
    Eddie Lien
    @cyriacr
    i import the private key generated by dexon-ganache to DekuSan and get different wallet addresses: some alphabets are capitalized. Are these 2 addresses still the same wallet?
    Eddie Lien
    @cyriacr
    nvm, i think ganache output lower case for all wallet addresses
    Wayne Chiu
    @CHAOWEICHIU

    @cyriacr

    you can convert those address to the correct format by using web3.utils.toChecksumAddress(address)

    Jazz
    @allthisjazz_twitter

    Some ideas for dapps @/all !

    From ERP to iERP: Excel Runs Production done intelligently
    How blockchain serves as the bond and bootstrap for IoT, AI, and UX

    READ MORE: https://medium.com/dexon/from-erp-to-ierp-excel-runs-production-done-intelligently-f5ef9fd2635e

    Jazz
    @allthisjazz_twitter

    incentive

    If you and your team are working on a DApp project, get a chance to receive rewards if you join the DEXON DApp incentive program.

    DEADLINE FOR SUBMISSION IS END OF MARCH 2019!

    JOIN NOW! https://dexon.org/incentive-program

    Jazz
    @allthisjazz_twitter
    DApp development: A getting started guide to build your DAPP on DEXON πŸ‘‰ https://medium.com/dexon/getting-started-on-your-dexon-dapp-61721abe84f5
    Jazz
    @allthisjazz_twitter
    Hey! Check out the new landing page for our DApp incentive program. Don't miss out the new ways to get incentives when you build you your DApp on DEXON as well. Look here πŸ‘€ https://dexon.org/incentive-program
    Jazz
    @allthisjazz_twitter

    ⛏ How to acquire DEXON coins: MINING

    Get more information on how DEXON miners can receive DXN rewards: https://medium.com/dexon/how-to-acquire-dexon-coins-mining-d51a8d94d9cb

    Jazz
    @allthisjazz_twitter

    mine

    GREAT NEWS!

    We have expanded our DApp Incentive program with the new...

    ✨ DApp Mining Program ✨

    5 million DXN will be rewarded to participants who can successfully create competitive DApps on DEXON!

    JOIN HERE πŸ‘‰ https://dexon.org/incentive-program
    READ MORE πŸ‘‰ https://medium.com/dexon/dexon-dapp-incentive-program-cfcc25556dd1

    Jazz
    @allthisjazz_twitter

    With only 3 days left to DEXON’s Public Sale on COBINHOOD, there are already so many exciting things lined up for everyone.

    WATCH πŸ‘€ https://www.youtube.com/watch?v=8XjjmNAzo_s

    Jazz
    @allthisjazz_twitter

    πŸ”₯ 2 DAYS UNTIL THE DXN PUBLIC SALE πŸ”₯

    Are you ready to join? In order to participate, make sure you first fulfill these requirements: https://medium.com/cobinhood/how-to-join-dexons-public-sale-on-cobinhood-s-coin-offering-platform-4c736bfc7b1b

    Wayne Chiu
    @CHAOWEICHIU
    AA.png
    if you know anyone who is deploying things on DEXON testnet, please help me to tag them.
    many thanks !!!
    Hsuan Lee
    @boczeratul
    @CHAOWEICHIU :clap:
    Wayne Chiu
    @CHAOWEICHIU
    f you are using truffle for your dapp development, you will need to specify the gasPrice to 24 at least.
    Here is the example code if you need a reference, https://github.com/dexon-foundation/hello-dexon/pull/10/files
    AA.png
    angelmariadas
    @angelmariadas

    I am trying to create a dapp(web3js - truffle) where an API - GET method has to be implemented by setting 'x-api-key' on header. Here is the code :

    app.js

    //1st method
    var xmlHttp = new XMLHttpRequest();
    xmlHttp.open( "GET", api, true );
    xmlHttp.setRequestHeader("x-api-key",key);
    xmlHttp.send();
    console.log("Result "+JSON.stringify(xmlHttp));
    
    //2nd method
    
    $.ajax({
    
          url: "api",
          type: "GET",
          headers :{
            "Access-Control-Allow-Origin": "*"
          },
          beforeSend: function (xhr) {
             xhr.setRequestHeader('x-api-key', key);
          },
          success: function (resp) {
              console.log("REsult :"+JSON.stringify(resp))
          },
          error: function(result){
            console.log("ERror : "+JSON.stringify(result));
          }
      });

    On chrome I get

    Blocked by CORS policy: The 'Access-Control-Allow-Origin'

    I am able to get data using POSTMAN and on an executable js script. Tried by adding Allow-Control-Allow-Origin: * extension and enabling it on chrome. Then output was :

    Response to preflight request doesn't pass access control check: It does not have HTTP ok status

    By trying above piece of code on meanstack - server side, it works. Do I have to write Nodejs backend for dapp? Is there other method to resolve it?

    Milo Chen
    @milochen0418
    @angelmariadas dexon is dead ... so don't waste time on it XD
    Shabbir Rajput
    @shabbirrajput92_gitlab
    hello i am new in blockchain field. some one please share a end to end creation on dapp on eth. tutorials.
    Ajitesh Mishra
    @AjiteshBD
    Hey i want to move my centralised forex algo-trading app to decentralized smart contract and publish it on ethereum network with minimal gas fee to run the algotrading app interact with forex broker api to put order per users. I need some idea on resources , system design and advice on how best implement it or should i consider another blockchain options like corda,hyperledger or cosmos.