Skip to content
This repository was archived by the owner on Sep 3, 2019. It is now read-only.

1.0.0 - Breaking Changes! Please Read!

Choose a tag to compare

@dwalintukan dwalintukan released this 13 Aug 14:13
· 9 commits to master since this release
2d765ed

Migrating to 1.0.0

This release brings some changes that will require updates from those using existing Qweb3 versions.

  • Contract has been removed from the module exports. You can now create a Contract instance from your Qweb3 instance with qweb3.Contract(contractAddress, contractAbi). It will use the same provider set in the Qweb3 instance.
  • Encoder has been added as part of your Qweb3 instance. eg. qweb3.encoder.uintToHex(). But it is also an exported class in the module.
  • Decoder has been added as part of your Qweb3 instance. eg. qweb3.decoder.toQtumAddress(). But it is also an exported class in the module.
  • Utils has been added as part of your Qweb3 instance. eg. qweb3.utils.appendHexPrefix(). But it is also an exported class in the module.
  • Formatter has been removed and it's functions were merged into Decoder. Formatter.searchLogOutput() -> Decoder.decodeSearchLog(). Formatter. callOutput() -> Decoder.decodeCall()

The Qweb3 constructor now accepts three different types:

  1. URL string - This is the same as before. It will create an HttpProvider for you.
  2. HttpProvider - It will accept an HttpProvider instance if ever needed.
  3. QryptoRPCProvider - This provider is specifically used in our Qrypto Wallet Chrome Extension. It has limited calling ability to rawCall only.

The purpose of this refactor was meant to ensure compatibility of other Providers like the QryptoRPCProvider.