Comment on page
Getting Started
fether provides a system for continuous frictionless connection between front end and back end developers work on decentralized applications.
fether is in its infancy and currently very opinionated. Namely, fether works exclusively with repositories using Foundry as their smart contract development framework.
fether Typescript Module provides a persistent updated ABI and contract address to use with your Ethereum interaction library of choice.
npm
pnpm
yarn
npm i fetherkit
pnpm i fetherkit
yarn add fetherkit
import Fether from "fetherkit";
const fether = new Fether(YOUR_API_KEY);
This can most easily be done within the useEffect hook, this loads your fether instance with all the data connected to your api key
useEffect(() => {
fether.init();
setWindowEthereum(window.ethereum as Ethereum);
return () => {};
}, []);
Now you can swap any instance of contract address or contract abi with your data from fether!
let publicClient = createPublicClient({
chain: fether.chain,
transport: http(),
});
const number = await publicClient.readContract({
address: fether.address,
abi: fether.abi,
functionName: "getLeNumber",
});
Last modified 7mo ago