ALPHA - UNPUBLISHED - EXPERIMENTAL USE ONLY
This module is an early work in progress. For the moment it is totally unsupported and should only be used in an experimental context.
A web3 provider which makes it possible to connect Truffle with Sawtooth Seth blockchains.
We intend to add support for all operations listed below, but items with a ❌ are yet to be completed.
- Use with
truffle-conflux-contractin browser ✔️
truffle test✔️ (if running against seth build which includes hyperledger/sawtooth-seth#77)
Important differences between Sawtooth Seth and Core Ethereum
It's important to know that Seth doesn't behave exactly like core Ethereum. An incomplete list of these differences is below.
statusflags on transaction receipt.
- Transaction receipts contain the transaction's return data.
- No support for the
- Gas price is always
- Much larger block and transaction hashes.
- Sawtooth's underlying data structure is a Radix Merkle Tree instead of a Merkle Patricia Tree.
- Blocks aren't mined in Sawtooth, they're validated by a central validator network.
- You must enable the BlockInfo Transaction Family if your contracts reqire the ability to read blockchain metadata (e.g. the previous block's hash).
npm install --save-dev truffle-conflux-sawtooth-seth-provider
const SethProvider = ;moduleexports =networks:seth:provider: ''network_id: "*" // Match any network id;
Usage in the browser with Webpack
Webpack is highly recommended for frontend usage. This README won't cover how to set up webpack for your project, as each project is different. However, when packing
truffle-sawtoot-seth-provider you may see an error about an inability to resolve the
fs module. The fs module isn't required for frontend use, so you can safely work around this error message by adding the following to your webpack configuration:
Printing RPC requests and responses
This module makes use of the
debug module to print RPC requests and responses. The debug module key for this module is
To enable RPC request/response output on the command line, ensure your
DEBUG environment variable contains
To enable RPC request/response output in the browser, open your debugging console and run
localStorage.debug = 'SethProvider:RPC' and refresh the page.
For more on how to use the
debug module, see the Usage section in the debug module's README.