dev-kit-js
Dev Kit for JavaScript
How to use
install
First, install this repository as an npm package.
> npm i -D @devprotocol/dev-kit
import
You can use the Dev Protocol by importing it from a JavaScript(TypeScript) file.
import { contractFactory } from '@devprotocol/dev-kit'
const provider = new Web3.providers.HttpProvider('http://localhost:8545')
const factory = contractFactory(provider)
cosnt balance = await factory.dev().balanceOf('0xB204f0Bb68De735b98abBA5ccAE7459837c2f084')
This is an example of retrieving the balance of the DEV token held by 0xB204f0Bb68De735b98abBA5ccAE7459837c2f084
It covers all the contracts and their functions that can be executed with the Dev Protocol.
The URL of the provider is easy to use with each node provisioning service.
how to develop
> yarn
> yarn test
> yarn test:coverage
> yarn build