0 reply
1 recast
1 reaction
Hello,
I have been trying to create a coin using the SDK with Privy Wagmi and I am following this guide: https://docs.zora.co/coins/sdk/create-coin#using-with-wagmi. It seems I cannot use the exact code you have provided because React gives me errors so I have tried to change it this way to make it work:
const coinParams = {
name: "My Awesome Coin",
symbol: "MAC",
uri: "ipfs://bafybeigoxzqzbnxsn35vq7lls3ljxdcwjafxvbvkivprsodzrptpiguysy",
payoutRecipient: "0xYourAddress" as Address,
platformReferrer: "0xOptionalPlatformReferrerAddress" as Address,
};
export default function CreateCoin() {
const [contractCallParams, setContractCallParams] = useState<any>(null);
const { writeContract, status, data, writeContractAsync } = useWriteContract(writeConfig);
useEffect(() => {
const initContractParams = async () => {
const params = await createCoinCall(coinParams);
setContractCallParams(params);
};
initContractParams();
}, []);
} 2 replies
0 recast
12 reactions
0 reply
0 recast
0 reaction