new deployment
This commit is contained in:
@@ -15,8 +15,12 @@ config({ path: new URL('../.env-secret', import.meta.url).pathname });
|
|||||||
// CONFIGURATION
|
// CONFIGURATION
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// Network flag: 'mockchain' or 'mainnet'
|
// Default pool parameters
|
||||||
const NETWORK = process.env.NETWORK || 'mainnet';
|
const POOL_NAME = 'Original Genesis of Liquidity Party';
|
||||||
|
const POOL_SYMBOL = 'OG.LP';
|
||||||
|
const KAPPA = ethers.BigNumber.from('184467440737095520');
|
||||||
|
const FLASH_FEE_PPM = 5;
|
||||||
|
const INPUT_USD_AMOUNT = 75; // Size of initial mint in USD
|
||||||
|
|
||||||
// Network-specific configuration
|
// Network-specific configuration
|
||||||
const NETWORK_CONFIG = {
|
const NETWORK_CONFIG = {
|
||||||
@@ -51,66 +55,69 @@ const NETWORK_CONFIG = {
|
|||||||
address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
address: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
||||||
coingeckoId: 'tether',
|
coingeckoId: 'tether',
|
||||||
decimals: 6,
|
decimals: 6,
|
||||||
feePpm: 40 // 0.0004%
|
feePpm: 40 // 0.4 bps
|
||||||
},
|
},
|
||||||
USDC: {
|
USDC: {
|
||||||
address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
||||||
coingeckoId: 'usd-coin',
|
coingeckoId: 'usd-coin',
|
||||||
decimals: 6,
|
decimals: 6,
|
||||||
feePpm: 40 // 0.0004%
|
feePpm: 40 // 0.4 bps
|
||||||
},
|
},
|
||||||
WBTC: {
|
WBTC: {
|
||||||
address: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
|
address: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
|
||||||
coingeckoId: 'wrapped-bitcoin',
|
coingeckoId: 'wrapped-bitcoin',
|
||||||
decimals: 8,
|
decimals: 8,
|
||||||
feePpm: 300 // 0.00030%
|
feePpm: 2_00 // 2 bps
|
||||||
},
|
},
|
||||||
WETH: {
|
WETH: {
|
||||||
address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
||||||
coingeckoId: 'weth',
|
coingeckoId: 'weth',
|
||||||
decimals: 18,
|
decimals: 18,
|
||||||
feePpm: 350 // 0.0035%
|
feePpm: 2_50 // 2.5 bps
|
||||||
},
|
},
|
||||||
UNI: {
|
UNI: {
|
||||||
address: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984',
|
address: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984',
|
||||||
coingeckoId: 'uniswap',
|
coingeckoId: 'uniswap',
|
||||||
decimals: 18,
|
decimals: 18,
|
||||||
feePpm: 1450 // 0.00145%
|
feePpm: 9_50 // 9.5 bps
|
||||||
},
|
},
|
||||||
WSOL: {
|
WSOL: {
|
||||||
address: '0xD31a59c85aE9D8edEFeC411D448f90841571b89c', // Wormhole Wrapped SOL
|
address: '0xD31a59c85aE9D8edEFeC411D448f90841571b89c', // Wormhole Wrapped SOL
|
||||||
coingeckoId: 'solana',
|
coingeckoId: 'solana',
|
||||||
decimals: 9,
|
decimals: 9,
|
||||||
feePpm: 950 // 0.00095%
|
feePpm: 9_50 // 9.5 bps
|
||||||
},
|
},
|
||||||
TRX: {
|
TRX: {
|
||||||
address: '0x50327c6c5a14DCaDE707ABad2E27eB517df87AB5',
|
address: '0x50327c6c5a14DCaDE707ABad2E27eB517df87AB5',
|
||||||
coingeckoId: 'tron',
|
coingeckoId: 'tron',
|
||||||
decimals: 6,
|
decimals: 6,
|
||||||
feePpm: 950 // 0.00095%
|
feePpm: 9_50 // 9.5 bps
|
||||||
},
|
},
|
||||||
AAVE: {
|
AAVE: {
|
||||||
address: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9',
|
address: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9',
|
||||||
coingeckoId: 'aave',
|
coingeckoId: 'aave',
|
||||||
decimals: 18,
|
decimals: 18,
|
||||||
feePpm: 1450 // 0.00145%
|
feePpm: 12_50 // 12.5 bps
|
||||||
},
|
},
|
||||||
PEPE: {
|
PEPE: {
|
||||||
address: '0x6982508145454Ce325dDbE47a25d4ec3d2311933',
|
address: '0x6982508145454Ce325dDbE47a25d4ec3d2311933',
|
||||||
coingeckoId: 'pepe',
|
coingeckoId: 'pepe',
|
||||||
decimals: 18,
|
decimals: 18,
|
||||||
feePpm: 2150 // 0.00215%
|
feePpm: 18_50 // 18.5 bps
|
||||||
},
|
},
|
||||||
SHIB: {
|
SHIB: {
|
||||||
address: '0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE',
|
address: '0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE',
|
||||||
coingeckoId: 'shiba-inu',
|
coingeckoId: 'shiba-inu',
|
||||||
decimals: 18,
|
decimals: 18,
|
||||||
feePpm: 2150 // 0.00215%
|
feePpm: 18_50 // 18.5 bps
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Network flag: 'mockchain' or 'mainnet'
|
||||||
|
const NETWORK = process.env.NETWORK || 'mainnet';
|
||||||
|
|
||||||
// Get current network config
|
// Get current network config
|
||||||
const currentConfig = NETWORK_CONFIG[NETWORK];
|
const currentConfig = NETWORK_CONFIG[NETWORK];
|
||||||
if (!currentConfig) {
|
if (!currentConfig) {
|
||||||
@@ -137,20 +144,16 @@ if (!RECEIVER_ADDRESS) {
|
|||||||
// Use network-specific tokens
|
// Use network-specific tokens
|
||||||
const TEST_TOKENS = currentConfig.tokens;
|
const TEST_TOKENS = currentConfig.tokens;
|
||||||
|
|
||||||
// Default pool parameters
|
|
||||||
const DEFAULT_POOL_PARAMS = {
|
const DEFAULT_POOL_PARAMS = {
|
||||||
name: 'Original Genesis of Liquidity Party',
|
name: POOL_NAME,
|
||||||
symbol: 'OG.LP',
|
symbol: POOL_SYMBOL,
|
||||||
kappa: ethers.BigNumber.from('184467440737095520'), //0.01 * 2^64
|
kappa: KAPPA, //0.01 * 2^64
|
||||||
swapFeesPpm: Object.values(TEST_TOKENS).map(t => t.feePpm),
|
swapFeesPpm: Object.values(TEST_TOKENS).map(t => t.feePpm),
|
||||||
flashFeePpm: 5, // 0.0005%
|
flashFeePpm: FLASH_FEE_PPM, // 0.0005%
|
||||||
stable: false,
|
stable: false,
|
||||||
initialLpAmount: ethers.utils.parseUnits('100', 18)
|
initialLpAmount: ethers.utils.parseUnits(INPUT_USD_AMOUNT.toString(), 18)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Input amount in USD
|
|
||||||
const INPUT_USD_AMOUNT = 100;
|
|
||||||
|
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// LOAD ABIs AND CONFIG
|
// LOAD ABIs AND CONFIG
|
||||||
|
|||||||
@@ -100,6 +100,25 @@ const IPartyPoolABI = [
|
|||||||
],
|
],
|
||||||
"stateMutability": "nonpayable"
|
"stateMutability": "nonpayable"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "function",
|
||||||
|
"name": "balance",
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"name": "index",
|
||||||
|
"type": "uint256",
|
||||||
|
"internalType": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256",
|
||||||
|
"internalType": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "function",
|
"type": "function",
|
||||||
"name": "balanceOf",
|
"name": "balanceOf",
|
||||||
@@ -119,6 +138,19 @@ const IPartyPoolABI = [
|
|||||||
],
|
],
|
||||||
"stateMutability": "view"
|
"stateMutability": "view"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "function",
|
||||||
|
"name": "balances",
|
||||||
|
"inputs": [],
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256[]",
|
||||||
|
"internalType": "uint256[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "function",
|
"type": "function",
|
||||||
"name": "burn",
|
"name": "burn",
|
||||||
|
|||||||
Reference in New Issue
Block a user