Skip to main content

Class: KandelFarm

Title

Repository for Kandel instances.

Constructors​

constructor​

β€’ new KandelFarm(mgv): KandelFarm

Constructor

Parameters​

NameTypeDescription
mgvMangroveThe Mangrove to get kandels for.

Returns​

KandelFarm

Defined in​

@mangrovedao/mangrove.js/src/kandel/kandelFarm.ts:20

Properties​

mgv​

β€’ mgv: Mangrove

Defined in​

@mangrovedao/mangrove.js/src/kandel/kandelFarm.ts:11


tradeEventManagement​

β€’ tradeEventManagement: TradeEventManagement

Defined in​

@mangrovedao/mangrove.js/src/kandel/kandelFarm.ts:12


aaveKandelSeeder​

β€’ aaveKandelSeeder: AaveKandelSeeder

Defined in​

@mangrovedao/mangrove.js/src/kandel/kandelFarm.ts:14


kandelSeeder​

β€’ kandelSeeder: KandelSeeder

Defined in​

@mangrovedao/mangrove.js/src/kandel/kandelFarm.ts:15

Methods​

getKandels​

β–Έ getKandels(filter?): Promise<{ kandelAddress: string = x.args.kandel; ownerAddress: string = x.args.owner; onAave: boolean = false; baseAddress: string = baseToken.address; base: Token = baseToken; quoteAddress: string = quoteToken.address; quote: Token = quoteToken }[]>

Gets all Kandels matching a given filter.

Parameters​

NameTypeDescription
filter?ObjectThe filter to apply.
filter.owner?null | stringThe Kandel instance owner - the one who invoked sow.
filter.baseQuoteOlKey?null | OLKeyStructThe low-level identifier of the market for the Kandel instance. Takes precedence over baseQuoteOfferList if both are provided.
filter.baseQuoteOfferList?null | { base: string ; quote: string ; tickSpacing: number }The identifier of the market for the Kandel instance using Mangrove token identifiers.
filter.onAave?booleanWhether the Kandel instance uses the Aave router.

Returns​

Promise<{ kandelAddress: string = x.args.kandel; ownerAddress: string = x.args.owner; onAave: boolean = false; baseAddress: string = baseToken.address; base: Token = baseToken; quoteAddress: string = quoteToken.address; quote: Token = quoteToken }[]>

All kandels matching the filter.

Defined in​

@mangrovedao/mangrove.js/src/kandel/kandelFarm.ts:51