sepolia deployment

This commit is contained in:
tim
2025-10-23 13:53:48 -04:00
parent 380c77b37e
commit a1e73df30a
13 changed files with 524 additions and 55 deletions

View File

@@ -1,6 +0,0 @@
{
"31337": {
"IPartyPlanner": "0xFc18426b71EDa3dC001dcc36ADC9C67bC6f38747",
"IPartyPoolViewer": "0xd85BdcdaE4db1FAEB8eF93331525FE68D7C8B3f0"
}
}

View File

@@ -2,7 +2,7 @@
import { getDefaultConfig, RainbowKitProvider, darkTheme, lightTheme } from '@rainbow-me/rainbowkit';
import { WagmiProvider } from 'wagmi';
import { mainnet, polygon, optimism, arbitrum, base } from 'wagmi/chains';
import { mainnet, polygon, optimism, arbitrum, base, sepolia } from 'wagmi/chains';
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
import { ThemeProvider, useTheme } from 'next-themes';
import { useEffect, useState } from 'react';
@@ -12,28 +12,35 @@ import { TranslationsProvider } from '@/providers/translations-provider';
import { Header } from '@/components/header';
import { ToastProvider } from '@/components/ui/toast';
import deployments from '@/contracts/liqp-deployments.json';
const mockchain = defineChain({
id: 31337,
name: 'Mockchain',
nativeCurrency: {
decimals: 18,
name: 'Ether',
symbol: 'ETH',
name: 'Test Ether',
symbol: 'TETH',
},
rpcUrls: {
default: { http: ['http://localhost:8545'] },
},
blockExplorers: {
default: { name: 'Explorer', url: 'http://localhost:8545' },
},
testnet: true,
});
const allChains = [mainnet, polygon, optimism, arbitrum, base, sepolia, mockchain];
const chains = allChains.filter(chain =>
Object.keys(deployments || {}).includes(chain.id.toString())
);
if (chains.length === 0) {
console.error('No chains found with deployed contracts.');
}
const config = getDefaultConfig({
appName: 'Liquidity Party',
projectId: 'YOUR_PROJECT_ID', // Get this from https://cloud.walletconnect.com
chains: [mainnet, polygon, optimism, arbitrum, base, mockchain],
ssr: false,
appName: 'Liquidity Party',
projectId: 'YOUR_PROJECT_ID', // Get this from https://cloud.walletconnect.com
chains: chains as any,
ssr: false,
});
const queryClient = new QueryClient({

View File

@@ -115,42 +115,42 @@ const IPartyPlannerABI = [
"name": "newPool",
"inputs": [
{
"name": "name_",
"name": "name",
"type": "string",
"internalType": "string"
},
{
"name": "symbol_",
"name": "symbol",
"type": "string",
"internalType": "string"
},
{
"name": "_tokens",
"name": "tokens",
"type": "address[]",
"internalType": "contract IERC20[]"
},
{
"name": "_bases",
"name": "bases",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "_kappa",
"name": "kappa",
"type": "int128",
"internalType": "int128"
},
{
"name": "_swapFeePpm",
"name": "swapFeePpm",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_flashFeePpm",
"name": "flashFeePpm",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_stable",
"name": "stable",
"type": "bool",
"internalType": "bool"
},
@@ -199,47 +199,47 @@ const IPartyPlannerABI = [
"name": "newPool",
"inputs": [
{
"name": "name_",
"name": "name",
"type": "string",
"internalType": "string"
},
{
"name": "symbol_",
"name": "symbol",
"type": "string",
"internalType": "string"
},
{
"name": "_tokens",
"name": "tokens",
"type": "address[]",
"internalType": "contract IERC20[]"
},
{
"name": "_bases",
"name": "bases",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "_tradeFrac",
"name": "tradeFrac",
"type": "int128",
"internalType": "int128"
},
{
"name": "_targetSlippage",
"name": "targetSlippage",
"type": "int128",
"internalType": "int128"
},
{
"name": "_swapFeePpm",
"name": "swapFeePpm",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_flashFeePpm",
"name": "flashFeePpm",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_stable",
"name": "stable",
"type": "bool",
"internalType": "bool"
},
@@ -283,6 +283,19 @@ const IPartyPlannerABI = [
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "poolCount",
@@ -315,6 +328,13 @@ const IPartyPlannerABI = [
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "swapImpl",
@@ -341,6 +361,38 @@ const IPartyPlannerABI = [
],
"stateMutability": "view"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "PartyStarted",
@@ -371,6 +423,28 @@ const IPartyPlannerABI = [
}
],
"anonymous": false
},
{
"type": "error",
"name": "OwnableInvalidOwner",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "OwnableUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
}
] as const;

View File

@@ -343,6 +343,26 @@ const IPartyPoolABI = [
],
"stateMutability": "view"
},
{
"type": "function",
"name": "kill",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "killed",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "mint",
@@ -403,6 +423,19 @@ const IPartyPoolABI = [
],
"stateMutability": "view"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "protocolFeeAddress",
@@ -429,6 +462,13 @@ const IPartyPoolABI = [
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "swap",
@@ -727,6 +767,19 @@ const IPartyPoolABI = [
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "wrapperToken",
@@ -735,7 +788,7 @@ const IPartyPoolABI = [
{
"name": "",
"type": "address",
"internalType": "contract IWETH9"
"internalType": "contract NativeWrapper"
}
],
"stateMutability": "view"
@@ -813,13 +866,31 @@ const IPartyPoolABI = [
"internalType": "address"
},
{
"name": "targetTokenIndex",
"type": "uint256",
"name": "tokenOut",
"type": "address",
"indexed": true,
"internalType": "contract IERC20"
},
{
"name": "amountIn",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "payoutUint",
"name": "amountOut",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "lpFee",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "protocolFee",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
@@ -827,6 +898,55 @@ const IPartyPoolABI = [
],
"anonymous": false
},
{
"type": "event",
"name": "Flash",
"inputs": [
{
"name": "initiator",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "receiver",
"type": "address",
"indexed": true,
"internalType": "contract IERC3156FlashBorrower"
},
{
"name": "token",
"type": "address",
"indexed": true,
"internalType": "contract IERC20"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "lpFee",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "protocolFee",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Killed",
"inputs": [],
"anonymous": false
},
{
"type": "event",
"name": "Mint",
@@ -858,6 +978,31 @@ const IPartyPoolABI = [
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ProtocolFeesCollected",
"inputs": [],
"anonymous": false
},
{
"type": "event",
"name": "Swap",
@@ -897,6 +1042,18 @@ const IPartyPoolABI = [
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "lpFee",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "protocolFee",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
@@ -918,25 +1075,31 @@ const IPartyPoolABI = [
"internalType": "address"
},
{
"name": "inputTokenIndex",
"type": "uint256",
"name": "tokenIn",
"type": "address",
"indexed": true,
"internalType": "uint256"
"internalType": "contract IERC20"
},
{
"name": "grossTransfer",
"name": "amountIn",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "netInput",
"name": "amountOut",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "feeTaken",
"name": "lpFee",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "protocolFee",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
@@ -968,6 +1131,28 @@ const IPartyPoolABI = [
}
],
"anonymous": false
},
{
"type": "error",
"name": "OwnableInvalidOwner",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "OwnableUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
}
] as const;

View File

@@ -2,7 +2,7 @@
import { useState, useEffect } from 'react';
import { usePublicClient } from 'wagmi';
import chainInfo from '../../../lmsr-amm/liqp-deployments.json';
import chainInfo from '@/contracts/liqp-deployments.json';
import IPartyPlannerABI from '@/contracts/IPartyPlannerABI';
import IPartyPoolABI from '@/contracts/IPartyPoolABI';
import { ERC20ABI } from '@/contracts/ERC20ABI';