the
mferbuilderdao-sdk
is 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.
add the package with your package manager of choice | npm registry page
yarn add mferbuilderdao-sdk
# or
npm install mferbuilderdao-sdk
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)
there are more in-depth examples in the examples
folder:
with-react
with-node
install dependencies
yarn
setup the local environment and run the React app
yarn dev:react
setup the local Node environment
yarn dev:node
navigate to the with-node
example directory
cd examples/with-node
run the script!
yarn dev
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