1.0.2 • Published 3 years ago
mferbuilderdao-sdk v1.0.2
mferbuilderdao-sdk
the
mferbuilderdao-sdkis a TypeScript library that provides type safe interactions and data fetching for the mferbuilderDAO contracts.
this is an mferbuilderDAO-scoped fork of the builder-sdk by neokry.
just getting started
add the package with your package manager of choice | npm registry page
yarn add mferbuilderdao-sdk
# or
npm install mferbuilderdao-sdkquick example
import { ethers } from 'ethers'
import { MferBuilderDAO } from 'mferbuilderdao-sdk'
// grab your Ethers provider of choice!
const provider = ethers.getDefaultProvider('mainnet')
// connect to the mferbuilderDAO SDK
const { auction, token } = MferBuilderDAO.connect({
  signerOrProvider: provider,
})
// access to the DAO's Auction and Token contracts
const auctionContract = auction()
const tokenContract = token()
// grab that data, mfer! all contract functions & events are available
const auctionData = await auctionContract.auction()
const tokenURI = await tokenContract.tokenURI(auctionData.tokenId)more examples
there are more in-depth examples in the examples folder:
- with-react
- with-node
develop locally using the examples
install dependencies
yarnwith React
setup the local environment and run the React app
yarn dev:reactwith Node
setup the local Node environment
yarn dev:nodenavigate to the with-node example directory
cd examples/with-noderun the script!
yarn devdevelopment workflow
you can edit the files in package directory then run the following command at the root of the project to have the changes reflect in the examples
yarn build