This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@polyjuice-provider/core
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-rc2 • Public • Published

Polyjuice Provider

a godwoken-polyjuice compatible library for ethereum utilities in JavaScript like ethers and web3js.

now you can call your smart-contract on godwoken-polyjuice with metamask and eth address.

getting started

How to deploy contract on polyjuice

docs

How to build

install deps:

    yarn 

build:

    yarn build

usage:

const PolyjuiceHttpProvider = require('@polyjuice-provider/core');

typescript supported:

import PolyjuiceHttpProvider from '@polyjuice-provider/core';

browser version lies in:

    /build/browser/PolyjuiceHttpProvider.js

usage:

<script src="/path/to/PolyjuiceHttpProvider.js"></script>

hardhat

hardhat is using ethers instead of web3.js, you can find ethers-compatibale JsonRpcProvider and WalletSigner in /lib/hardhat/providers

usage:

const { PolyjuiceJsonRpcProvider } = require('PolyjuiceHttpProvider/lib/hardhat/providers');
const PolyjuiceWallet = require('PolyjuiceHttpProvider/lib/hardhat/wallet-signer');

before you can run test and an minimal example, create an .test.env file with some godwoken-polyjuice config.

cat > ./test.env <<EOF
WEB3_JSON_RPC=<godwoken web3 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>
EOF

test

    yarn test

start a minimal dapp example

    yarn example

Readme

Keywords

none

Package Sidebar

Install

npm i @polyjuice-provider/core

Weekly Downloads

1

Version

0.0.1-rc2

License

MIT

Unpacked Size

893 kB

Total Files

18

Last publish

Collaborators

  • retric