Skip to content

Instantly create a basic UI for your smart contract, with additional configurations available for improving UX.

License

Notifications You must be signed in to change notification settings

eemebarbe/ez-contract-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plug an ethers.js Contract instance into this library and get an simple, instant React front end for your smart contract. This project is not yet ready for consumption. NPM module coming soon.

Example if you want to try to use it before it's ready anyway:

import { render } from "react-dom"
import EzContractUi from "./ez-contract-ui"
import { ethers } from "ethers"
import YourContract from "../../artifacts/contracts/YourContract.sol/YourContract.json"
let contractAddress = process.env.REACT_APP_CONTRACT_ADDRESS

const provider = new ethers.providers.Web3Provider(window.ethereum)
const signer = provider.getSigner()
const contract = new ethers.Contract(contractAddress, YourContract.abi, signer)
const contractUi = new EzContractUi(contract, () => {})

const rootElement = document.getElementById("root")
render(<>{contractUi.app()}</>, rootElement)

About

Instantly create a basic UI for your smart contract, with additional configurations available for improving UX.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published