Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QtumJS support for Ethereum #11

Open
hayeah opened this issue Feb 23, 2018 · 0 comments
Open

QtumJS support for Ethereum #11

hayeah opened this issue Feb 23, 2018 · 0 comments

Comments

@hayeah
Copy link
Collaborator

hayeah commented Feb 23, 2018

It would be an interesting exercise to reimplement QtumJS's RPCs to make it work in MetaMask.

The RPC methods related to invoking a contract's methods are:

Confirming A Send Tx

The send API looks like

  const tx = await myToken.send("mint", [toAddr, amount])

  console.log("tx:", tx)

  // Wait for 3 confirmations. The callback receives the
  // updated transaction info for each additional confirmation.
  //
  // Both arguments are optional. `await tx.confirm()` would do.
  const receipt = await tx.confirm(3, (updatedTx) => {
    console.log("new confirmation", updatedTx.txid, updatedTx.confirmations)
  })

The confirm method is implemented in TxReceiptPromise

Because the QTUM RPC calls return very different data than Ethereum's RPC, it's probably more realistic to fork qtumjs, and implement a few things as an experiment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant