A web3 provider which makes it possible to connect Truffle with Sawtooth Seth blockchains.
MIT License
This module is totally unsupported and should only be used in an experimental context.
This repository will likely move or be integrated into the main Truffle monorepo before this module is released.
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.
truffle migrate
truffle-contract
in browsertruffle test
truffle debug
It's important to know that Seth doesn't behave exactly like core Ethereum. An incomplete list of these differences is below.
status
flags on transaction receipt.REVERT
opcode.0
.For a more comprehensive understanding of Sawtooth's architecture, please see the Architecture Description section of Sawtooth's documentation site.
npm install --save-dev truffle-sawtooth-seth-provider
Example truffle-config.js
:
const SethProvider = require('truffle-sawtooth-seth-provider');
module.exports = {
networks: {
seth: {
provider: new SethProvider('http://127.0.0.1:3030'),
network_id: "*" // Match any network id
}
}
};
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:
node: {
fs: "empty"
}
This module makes use of the debug
module to print RPC requests and responses. The debug module key for this module is SethProvider
.
To enable RPC request/response output on the command line, ensure your DEBUG
environment variable contains SethProvider:RPC
.
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.