Compare commits
3 commits
41a3d52319
...
62ba6f24fd
| Author | SHA1 | Date | |
|---|---|---|---|
| 62ba6f24fd | |||
|
|
caabcde20c | ||
|
|
e20b4517fd |
3 changed files with 17 additions and 1 deletions
|
|
@ -104,6 +104,9 @@ write_ponder_env() {
|
||||||
PONDER_NETWORK=$NETWORK_NAME
|
PONDER_NETWORK=$NETWORK_NAME
|
||||||
KRAIKEN_ADDRESS=$KRAIKEN
|
KRAIKEN_ADDRESS=$KRAIKEN
|
||||||
STAKE_ADDRESS=$STAKE
|
STAKE_ADDRESS=$STAKE
|
||||||
|
LM_ADDRESS=$LIQUIDITY_MANAGER
|
||||||
|
POOL_ADDRESS=$POOL_ADDRESS
|
||||||
|
MINIMUM_BLOCKS_FOR_RINGBUFFER=0
|
||||||
START_BLOCK=$DEPLOY_BLOCK
|
START_BLOCK=$DEPLOY_BLOCK
|
||||||
PONDER_RPC_URL_${NETWORK_NAME}=$ANVIL_RPC
|
PONDER_RPC_URL_${NETWORK_NAME}=$ANVIL_RPC
|
||||||
DATABASE_URL=postgresql://ponder:ponder_local@postgres:5432/ponder_local
|
DATABASE_URL=postgresql://ponder:ponder_local@postgres:5432/ponder_local
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,19 @@ extract_addresses() {
|
||||||
bootstrap_log "LiquidityManager address missing"
|
bootstrap_log "LiquidityManager address missing"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Discover Uniswap pool address from factory
|
||||||
|
POOL_ADDRESS=""
|
||||||
|
detect_swap_router
|
||||||
|
local factory
|
||||||
|
factory=$(cast call --rpc-url "$ANVIL_RPC" "$SWAP_ROUTER" "factory()(address)" 2>/dev/null) || factory=""
|
||||||
|
if [[ -n "$factory" && "$factory" != "0x" ]]; then
|
||||||
|
POOL_ADDRESS=$(cast call --rpc-url "$ANVIL_RPC" "$factory" "getPool(address,address,uint24)(address)" "$WETH" "$KRAIKEN" 10000 2>/dev/null) || POOL_ADDRESS=""
|
||||||
|
fi
|
||||||
|
if [[ -z "$POOL_ADDRESS" || "$POOL_ADDRESS" == "0x0000000000000000000000000000000000000000" ]]; then
|
||||||
|
bootstrap_log "Warning: could not discover pool address"
|
||||||
|
POOL_ADDRESS=""
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
write_contracts_env() {
|
write_contracts_env() {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ export type StatsContext = HandlerArgs extends { context: infer C } ? C : never;
|
||||||
type StatsEvent = HandlerArgs extends { event: infer E } ? E : never;
|
type StatsEvent = HandlerArgs extends { event: infer E } ? E : never;
|
||||||
|
|
||||||
export const RING_BUFFER_SEGMENTS = 4; // ethReserve, minted, burned, holderCount
|
export const RING_BUFFER_SEGMENTS = 4; // ethReserve, minted, burned, holderCount
|
||||||
export const MINIMUM_BLOCKS_FOR_RINGBUFFER = 100;
|
export const MINIMUM_BLOCKS_FOR_RINGBUFFER = parseInt(process.env.MINIMUM_BLOCKS_FOR_RINGBUFFER || '100');
|
||||||
|
|
||||||
// Get deploy block from environment (set by bootstrap)
|
// Get deploy block from environment (set by bootstrap)
|
||||||
const DEPLOY_BLOCK = BigInt(process.env.START_BLOCK || '0');
|
const DEPLOY_BLOCK = BigInt(process.env.START_BLOCK || '0');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue