Skip to main content

src/lib/cca/marketFloor

creatorvault-miniapp


creatorvault-miniapp / src/lib/cca/marketFloor

src/lib/cca/marketFloor

Interfaces

ReadonlyPublicClient

Defined in: lib/cca/marketFloor.ts:130

Methods

getBlock()

getBlock(args): Promise<any>

Defined in: lib/cca/marketFloor.ts:135

Parameters
args

any

Returns

Promise<any>

getBlockNumber()

getBlockNumber(args?): Promise<bigint>

Defined in: lib/cca/marketFloor.ts:134

Parameters
args?

any

Returns

Promise<bigint>

getLogs()

getLogs(args): Promise<any[]>

Defined in: lib/cca/marketFloor.ts:136

Parameters
args

any

Returns

Promise<any[]>

multicall()

multicall(args): Promise<any>

Defined in: lib/cca/marketFloor.ts:133

Parameters
args

any

Returns

Promise<any>

readContract()

readContract(args): Promise<any>

Defined in: lib/cca/marketFloor.ts:132

Parameters
args

any

Returns

Promise<any>

Type Aliases

MarketFloorQuote

MarketFloorQuote = object

Defined in: lib/cca/marketFloor.ts:94

Properties

creatorZora

creatorZora: object

Defined in: lib/cca/marketFloor.ts:104

creatorPerZora

creatorPerZora: number

currency0

currency0: Address

currency1

currency1: Address

durationSec

durationSec: number

fromBlock

fromBlock: bigint

liquidity

liquidity: bigint

meanTick

meanTick: number

Time-weighted mean tick over the window

poolId

poolId: `0x${string}`

sampleCount

sampleCount: number

spotTick

spotTick: number

Spot tick at toBlock (latest state)

toBlock

toBlock: bigint

floorPriceQ96

floorPriceQ96: bigint

Defined in: lib/cca/marketFloor.ts:100

floorPriceQ96Aligned

floorPriceQ96Aligned: bigint

Defined in: lib/cca/marketFloor.ts:96

tickSpacingQ96

tickSpacingQ96: bigint

Defined in: lib/cca/marketFloor.ts:99

weiPerToken

weiPerToken: bigint

Defined in: lib/cca/marketFloor.ts:101

zoraEth

zoraEth: object

Defined in: lib/cca/marketFloor.ts:119

discountBps

discountBps: number

durationSec

durationSec: number

ethPerZoraConservative

ethPerZoraConservative: number

ethPerZoraUsdcTwap?

optional ethPerZoraUsdcTwap: number

ethPerZoraWethTwap?

optional ethPerZoraWethTwap: number

Functions

computeMarketFloorQuote()

computeMarketFloorQuote(params): Promise<MarketFloorQuote>

Defined in: lib/cca/marketFloor.ts:440

Parameters

params
creatorCoin

`0x${string}`

discountBps?

number

publicClient

ReadonlyPublicClient

twapDurationSec?

number

Lookback window for sampling the CREATOR/ZORA v4 pool tick.

zoraEthTwapDurationSec?

number

TWAP window used for ZORA reference pricing from Uniswap v3 pools.

Returns

Promise<MarketFloorQuote>