Skip to main content

contracts/handlers/nucleus-accountant-handler

Classes

NucleusAccountantHandler

Handler for the Accountant contract from nucleus.

Constructors

new NucleusAccountantHandler()

new NucleusAccountantHandler(chain, walletClient, publicClient): NucleusAccountantHandler

Create the handler for processing tokens.

Parameters
ParameterTypeDescription
chainChainChain to use for the client.
walletClientobjectThe wallet client to use for wallet interactions.
publicClientobjectThe public client to use for public interactions.
Returns

NucleusAccountantHandler

Source

lib/contracts/handlers/nucleus-accountant-handler.ts:27

Properties

PropertyModifierTypeDescription
chainprivateChainChain to use for the client.
publicClientprivateobjectThe public client to use for public interactions.
walletClientprivateobjectThe wallet client to use for wallet interactions.

Methods

getContract()

getContract(): object

Get the contract. This is a method because the typings are complex and lost when trying to make it a member.

Returns

object

The viem contract.

Source

lib/contracts/handlers/nucleus-accountant-handler.ts:39

getRate()

getRate(): Promise<bigint>

Get the rate for the given token address.

Returns

Promise<bigint>

Rate for the given token address.

Source

lib/contracts/handlers/nucleus-accountant-handler.ts:78

getRateInQuote()

getRateInQuote(quoteAddress): Promise<bigint>

Get the rate from the given quote address.

Parameters
ParameterType
quoteAddress`0x${string}`
Returns

Promise<bigint>

Rate for the given quote address.

Source

lib/contracts/handlers/nucleus-accountant-handler.ts:96

getRateInQuoteSafe()

getRateInQuoteSafe(quoteAddress): Promise<bigint>

Get the rate from the given quote address for safe.

Parameters
ParameterType
quoteAddress`0x${string}`
Returns

Promise<bigint>

Rate for the given quote address for safe.

Source

lib/contracts/handlers/nucleus-accountant-handler.ts:105

getRateSafe()

getRateSafe(): Promise<bigint>

Get the rate for the given token address for safe.

Returns

Promise<bigint>

Rate for the given token address for safe.

Source

lib/contracts/handlers/nucleus-accountant-handler.ts:87

rateProviderData()

rateProviderData(tokenAddress): Promise<object>

Get the rate provider data for the given token address.

Parameters
ParameterTypeDescription
tokenAddress`0x${string}`Address of the token.
Returns

Promise<object>

Rate provider data for the given token address.

isPeggedToBase

isPeggedToBase: boolean

rateProvider

rateProvider: `0x${string}`

Source

lib/contracts/handlers/nucleus-accountant-handler.ts:57

vault()

vault(): Promise<`0x${string}`>

Get the vault for the given token address.

Returns

Promise<`0x${string}`>

Vault for the given token address.

Source

lib/contracts/handlers/nucleus-accountant-handler.ts:69