@polyjuice-provider/web3
v0.1.5
Published
this is a sub-module of @polyjuice-provider.
Readme
@polyjuice-provider/web3
this is a sub-module of @polyjuice-provider.
Install
yarn add @polyjuice-provider/web3 or
npm install --save @polyjuice-provider/web3 Usage
read docs here
How to develop this module
build:
yarn buildbefore you can run test and an minimal example, you should run godwoken-kicker and create an .test.env file with some godwoken-polyjuice config.
cat > ./.test.env <<EOF
WEB3_JSON_RPC=<godwoken-web3 rpc>
WEB3_WS_JSON_RPC=<godwoken-web3 websocket rpc>
ROLLUP_TYPE_HASH=<godwoken rollup type hash>
ETH_ACCOUNT_LOCK_CODE_HASH=<eth account lock code hash>
EXAMPLE_CONTRACT_ADDRESS=<an example test contract deployed address>
PRIVATE_KEY=<your eth test private key, do not use in production>
ETH_ADDRESS=<your eth test address, match with private_key above>
EOFin order to get EXAMPLE_CONTRACT_ADDRESS, you should deploy this test contract in godwoken-kicker.
test
yarn teststart a minimal dapp example
yarn example