1.1.0 • Published 3 years ago
@dfdao/dynasty v1.1.0
Install
Contract addresses, abi, and types for dfdao's eternal grand prix.
Includes the registry and reward contracts
yarn add @dfdao/dyntastyUsage
// abis
import { abi as RegistryAbi } from "@dfdao/dynasty/abi/Registry.json";
import { abi as NFTAbi } from "@dfdao/dynasty/abi/NFT.json";
// Contract addresses
import { registry, nft } from "@dfdao/dynasty/deployment.json";
// assuming you're using wagmi.sh
const {
data,
isError,
isLoading,
} = useContractRead({
addressOrName: registry,
contractInterface: registryABI,
functionName: "getAllGrandPrix",
watch: true,
});Deployment
$ cp .env.example .env- If deploying contracts to a public chain, switch out
PRIVATE_KEY,RPC_URL, andCHAIN_IDin.envwith the correct values for your chain. $ yarn deploy. This will also copy the new values over to the Dynasty client.
Local testing
Make sure you have Foundry installed.
In your terminal, run:
yarn start:nodeIn another tab:
yarn deployThe NFT and Registry contracts are now deployed locally.
You can test them in the client by running yarn dev in dynasty/client