feat: fill up challenge
Some checks failed
Lint / ci (lts/*, ubuntu-latest) (push) Has been cancelled

This commit is contained in:
han
2026-01-12 10:11:35 +07:00
parent 64378512ba
commit eca584fd05
10 changed files with 948 additions and 10 deletions

View File

@@ -4,6 +4,441 @@
*/
import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract";
const deployedContracts = {} as const;
const deployedContracts = {
31337: {
CrowdFund: {
address: "0x09635F643e140090A9A8Dcd712eD6285858ceBef",
abi: [
{
inputs: [
{
internalType: "address",
name: "fundingRecipientAddress",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
inputs: [],
name: "AlreadyCompleted",
type: "error",
},
{
inputs: [],
name: "NotOpenToWithdraw",
type: "error",
},
{
inputs: [
{
internalType: "uint256",
name: "deadline",
type: "uint256",
},
{
internalType: "uint256",
name: "currentTimestamp",
type: "uint256",
},
],
name: "TooEarly",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "to",
type: "address",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "WithdrawTransferFailed",
type: "error",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "",
type: "uint256",
},
],
name: "Contribution",
type: "event",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "balances",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "contribute",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "deadline",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "execute",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "fundingRecipient",
outputs: [
{
internalType: "contract FundingRecipient",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "openToWithdraw",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "threshold",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "timeLeft",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
stateMutability: "payable",
type: "receive",
},
],
inheritedFunctions: {},
deployedOnBlock: 6786,
},
FundingRecipient: {
address: "0x59b670e9fA9D0A427751Af201D676719a970857b",
abi: [
{
inputs: [],
name: "complete",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "completed",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
],
inheritedFunctions: {},
deployedOnBlock: 4703,
},
},
11155111: {
CrowdFund: {
address: "0x6DbF57cA13C63f1Ba977405b128120Ded42ee8a7",
abi: [
{
inputs: [
{
internalType: "address",
name: "fundingRecipientAddress",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
inputs: [],
name: "AlreadyCompleted",
type: "error",
},
{
inputs: [],
name: "NotOpenToWithdraw",
type: "error",
},
{
inputs: [
{
internalType: "uint256",
name: "deadline",
type: "uint256",
},
{
internalType: "uint256",
name: "currentTimestamp",
type: "uint256",
},
],
name: "TooEarly",
type: "error",
},
{
inputs: [
{
internalType: "address",
name: "to",
type: "address",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "WithdrawTransferFailed",
type: "error",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "",
type: "uint256",
},
],
name: "Contribution",
type: "event",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "balances",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "contribute",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "deadline",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "execute",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "fundingRecipient",
outputs: [
{
internalType: "contract FundingRecipient",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "openToWithdraw",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "threshold",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "timeLeft",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
stateMutability: "payable",
type: "receive",
},
],
inheritedFunctions: {},
deployedOnBlock: 10021915,
},
FundingRecipient: {
address: "0xeA89D4E3dA2eb001631dD1c0CFa0D922869D1836",
abi: [
{
inputs: [],
name: "complete",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "completed",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
],
inheritedFunctions: {},
deployedOnBlock: 10021914,
},
},
} as const;
export default deployedContracts satisfies GenericContractsDeclaration;

View File

@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View File

@@ -15,7 +15,7 @@ export const DEFAULT_ALCHEMY_API_KEY = "cR4WnXePioePZ5fFrnSiR";
const scaffoldConfig = {
// The networks on which your DApp is live
targetNetworks: [chains.hardhat],
targetNetworks: [chains.sepolia],
// The interval at which your front-end polls the RPC servers for new data (it has no effect if you only target the local network (default is 4000))
pollingInterval: 30000,
// This is ours Alchemy's default API key.
@@ -34,7 +34,7 @@ const scaffoldConfig = {
// It's recommended to store it in an env variable:
// .env.local for local testing, and in the Vercel/system env config for live apps.
walletConnectProjectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || "3a8170812b534d0ff9d794f19a901d64",
onlyLocalBurnerWallet: true,
onlyLocalBurnerWallet: false, //true,
} as const satisfies ScaffoldConfig;
export default scaffoldConfig;