Skip to content

dev-protocol/dev-kit-js

Folders and files

NameName
Last commit message
Last commit date
Oct 23, 2023
Apr 25, 2021
May 11, 2024
Jul 14, 2023
Aug 13, 2024
Oct 13, 2019
Jun 7, 2022
Jul 15, 2023
Jun 7, 2022
Jun 7, 2022
Oct 13, 2019
Oct 21, 2019
Jan 4, 2023
Apr 5, 2025
Apr 19, 2020
Oct 25, 2023
Oct 25, 2023
Mar 10, 2023
Apr 5, 2025

Repository files navigation

dev-kit-js

CI Status code style: prettier

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'
import { providers } from 'ethers'

const provider = new providers.Web3Provider(window.ethereum)
const factory = contractFactory(provider)
const 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

## install dependency
> yarn

## test
> yarn test

## test with coverage
> yarn test:coverage

## build
> yarn build

how to publish

> npm version [major|minor|patch]
> git push && git push --tags

GitHub Actions "Publish" automatically publishes the new version.