Loading data from network...
import { http } from 'viem'
import { celoSepolia } from 'viem/chains'
import { createConfig } from '@privy-io/wagmi'
export const DEMO_MODE = import.meta.env.VITE_DEMO_MODE === 'true'
export const chains = [celoSepolia]
const transports = {
[celoSepolia.id]: http(import.meta.env.VITE_CELO_SEPOLIA_RPC_URL || undefined)
}
export const wagmiConfig = createConfig({
chains,
transports,
connectors: DEMO_MODE ? [] : undefined
})
export const STABLECOINS = {
celoSepolia: {
USDm: import.meta.env.VITE_USDM_ADDRESS_CELO_SEPOLIA || '0xdE9e4C3ce781b4bA68120d6261cbad65ce0aB00b'
}
}
export const STABLECOIN_SYMBOL = 'NGN'
export const STABLECOIN_DECIMALS = 6
export const FACTORY_ADDRESS = import.meta.env.VITE_FACTORY_ADDRESS || ''
export const AJO_POOL_ABI = [
{
"inputs": [
{ "internalType": "address", "name": "_stablecoin", "type": "address" }
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{ "internalType": "string", "name": "_groupName", "type": "string" },
{ "internalType": "uint256", "name": "_contributionAmount", "type": "uint256" },
{ "internalType": "uint256", "name": "_maxMembers", "type": "uint256" },
{ "internalType": "uint256", "name": "_frequencySeconds", "type": "uint256" }
],
"name": "createGroup",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "joinGroup",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "contribute",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "executePayout",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getMembers",
"outputs": [
{ "internalType": "address[]", "name": "", "type": "address[]" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getPoolBalance",
"outputs": [
{ "internalType": "uint256", "name": "", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "groupName",
"outputs": [
{ "internalType": "string", "name": "", "type": "string" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "contributionAmount",
"outputs": [
{ "internalType": "uint256", "name": "", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxMembers",
"outputs": [
{ "internalType": "uint256", "name": "", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "payoutIndex",
"outputs": [
{ "internalType": "uint256", "name": "", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "currentRound",
"outputs": [
{ "internalType": "uint256", "name": "", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "member", "type": "address" }
],
"name": "hasContributed",
"outputs": [
{ "internalType": "bool", "name": "", "type": "bool" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "stablecoin",
"outputs": [
{ "internalType": "address", "name": "", "type": "address" }
],
"stateMutability": "view",
"type": "function"
}
]
export const AJO_FACTORY_ABI = [
{
"inputs": [
{ "internalType": "address", "name": "_stablecoin", "type": "address" }
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{ "internalType": "string", "name": "_groupName", "type": "string" },
{ "internalType": "uint256", "name": "_contributionAmount", "type": "uint256" },
{ "internalType": "uint256", "name": "_maxMembers", "type": "uint256" },
{ "internalType": "uint256", "name": "_frequencySeconds", "type": "uint256" }
],
"name": "createGroup",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "pool", "type": "address" },
{ "indexed": true, "internalType": "address", "name": "creator", "type": "address" },
{ "indexed": false, "internalType": "string", "name": "name", "type": "string" },
{ "indexed": false, "internalType": "uint256", "name": "contributionAmount", "type": "uint256" },
{ "indexed": false, "internalType": "uint256", "name": "maxMembers", "type": "uint256" }
],
"name": "GroupCreated",
"type": "event"
},
{
"inputs": [],
"name": "getPools",
"outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }],
"stateMutability": "view",
"type": "function"
}
]
export const ERC20_ABI = [
{
"constant": true,
"inputs": [{ "name": "account", "type": "address" }],
"name": "balanceOf",
"outputs": [{ "name": "", "type": "uint256" }],
"type": "function"
},
{
"constant": false,
"inputs": [
{ "name": "spender", "type": "address" },
{ "name": "amount", "type": "uint256" }
],
"name": "approve",
"outputs": [{ "name": "", "type": "bool" }],
"type": "function"
},
{
"constant": true,
"inputs": [
{ "name": "owner", "type": "address" },
{ "name": "spender", "type": "address" }
],
"name": "allowance",
"outputs": [{ "name": "", "type": "uint256" }],
"type": "function"
}
]
export const DEFAULT_FREQUENCY_SECONDS = 60 * 60 * 24 * 7