diff --git a/app/components/create-listing-dialog/listing-progress.tsx b/app/components/create-listing-dialog/listing-progress.tsx index ef00e115..f00c78d2 100644 --- a/app/components/create-listing-dialog/listing-progress.tsx +++ b/app/components/create-listing-dialog/listing-progress.tsx @@ -24,7 +24,7 @@ import { } from "lucide-react"; import Link from "next/link"; import React, { useEffect, useRef, useState } from "react"; -import { createWalletClient, custom, formatEther } from "viem"; +import { createWalletClient, custom, erc20Abi, formatEther } from "viem"; import { celo } from "viem/chains"; import { useAccount, usePublicClient } from "wagmi"; @@ -309,11 +309,13 @@ const ListingProgress = ({ ), }); const [account] = await walletClient.getAddresses(); - const txhash = await walletClient.sendTransaction({ + const txhash = await walletClient.writeContract({ account, - to: GAINFOREST_TIP_ADDRESS, - value: GAINFOREST_TIP_AMOUNT, - data: `0x${DIVVI_DATA_SUFFIX}`, + address: "0x471EcE3750Da237f93B8E339c536989b8978a438", // Celo CELO token address + abi: erc20Abi, + functionName: "transfer", + args: [GAINFOREST_TIP_ADDRESS, GAINFOREST_TIP_AMOUNT], + dataSuffix: `0x${DIVVI_DATA_SUFFIX}`, }); if (txhash) { diff --git a/app/hypercert/[hypercertId]/components/PurchaseFlow/payment-progress/store.ts b/app/hypercert/[hypercertId]/components/PurchaseFlow/payment-progress/store.ts index b662f9b9..f98b499a 100644 --- a/app/hypercert/[hypercertId]/components/PurchaseFlow/payment-progress/store.ts +++ b/app/hypercert/[hypercertId]/components/PurchaseFlow/payment-progress/store.ts @@ -17,7 +17,7 @@ import { Loader2, type LucideProps, } from "lucide-react"; -import { createWalletClient, custom, formatEther } from "viem"; +import { createWalletClient, custom, erc20Abi, formatEther } from "viem"; import { celo } from "viem/chains"; import { create } from "zustand"; @@ -247,11 +247,13 @@ const usePaymentProgressStore = create< ), }); const [account] = await walletClient.getAddresses(); - const txhash = await walletClient.sendTransaction({ + const txhash = await walletClient.writeContract({ account, - to: GAINFOREST_TIP_ADDRESS, - value: GAINFOREST_TIP_AMOUNT, - data: `0x${DIVVI_DATA_SUFFIX}`, + address: "0x471EcE3750Da237f93B8E339c536989b8978a438", // Celo CELO token address + abi: erc20Abi, + functionName: "transfer", + args: [GAINFOREST_TIP_ADDRESS, GAINFOREST_TIP_AMOUNT], + dataSuffix: `0x${DIVVI_DATA_SUFFIX}`, }); // We don't wait for confirmation as per requirements submitReferral({ diff --git a/app/page.tsx b/app/page.tsx index 2604bcb0..09b33b08 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -11,12 +11,12 @@ export default async function Home() { return (
- - {/* ⚠️ + {/* + ⚠️

Service notice: Stablecoin purchases on Ecocertain are down. We're working on a fix. -

*/} +

🎉

Announcement: Ecocertain Reward Round 0 has ended! Payouts @@ -28,7 +28,7 @@ export default async function Home() { Learn more.

-
+
*/}
diff --git a/app/submit/components/minting-progress-dialog/minting-progress.tsx b/app/submit/components/minting-progress-dialog/minting-progress.tsx index b4ddf9c8..0b3c3927 100644 --- a/app/submit/components/minting-progress-dialog/minting-progress.tsx +++ b/app/submit/components/minting-progress-dialog/minting-progress.tsx @@ -25,7 +25,7 @@ import { } from "lucide-react"; import Link from "next/link"; import React, { useEffect, useRef, useState } from "react"; -import { createWalletClient, custom, formatEther } from "viem"; +import { createWalletClient, custom, erc20Abi, formatEther } from "viem"; import { celo } from "viem/chains"; import { useAccount, usePublicClient } from "wagmi"; import type { MintingFormValues } from "../hypercert-form"; @@ -314,11 +314,13 @@ const MintingProgress = ({ ), }); const [account] = await walletClient.getAddresses(); - const txhash = await walletClient.sendTransaction({ + const txhash = await walletClient.writeContract({ account, - to: GAINFOREST_TIP_ADDRESS, - value: GAINFOREST_TIP_AMOUNT, - data: `0x${DIVVI_DATA_SUFFIX}`, + address: "0x471EcE3750Da237f93B8E339c536989b8978a438", // Celo CELO token address + abi: erc20Abi, + functionName: "transfer", + args: [GAINFOREST_TIP_ADDRESS, GAINFOREST_TIP_AMOUNT], + dataSuffix: `0x${DIVVI_DATA_SUFFIX}`, }); if (txhash) {