Skip to main content

contracts/handlers/nucleus-teller-handler

Classes

NucleusTellerHandler

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:33

Handler for the Teller contract from nucleus.

Constructors

Constructor

new NucleusTellerHandler(chain, walletClient, publicClient): NucleusTellerHandler

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:47

Create the handler for processing tokens.

Parameters
ParameterTypeDescription
chainChainChain to use for the client.
walletClient{ }The wallet client to use for wallet interactions.
publicClient{ }The public client to use for public interactions.
Returns

NucleusTellerHandler

Methods

accountant()

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

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:97

Get the address of the Accountant contract.

Returns

Promise<`0x${string}`>

The address of the Accountant contract.

deposit()

deposit(params): Promise<{ estimate: () => Promise<bigint>; transact: () => Promise<`0x${string}`>; }>

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:156

Deposit the given token for staking. This doesn't make the transaction but returns two methods namely transact and estimate.

Parameters
ParameterTypeDescription
paramsDepositParamsDeposit parameters.
Returns

Promise<{ estimate: () => Promise<bigint>; transact: () => Promise<`0x${string}`>; }>

transact: () => Promise<Address> - Used to make the transaction with the given value.

estimate: () => Promise<bigint> - Gas estimate of the transaction.

depositWithPermit()

depositWithPermit(params): object

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:235

Deposit an asset/token for staking with a permit.

Parameters
ParameterTypeDescription
paramsDepositWithPermitParamsPermit parameters.
Returns

object

transact: () => Promise<Address> - Used to make the transaction with the given value.

estimate: () => Promise<bigint> - Gas estimate of the transaction.

estimate()

estimate: () => Promise<bigint>

Returns

Promise<bigint>

transact()

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

Returns

Promise<`0x${string}`>

getContract()

getContract(): object

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:79

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.

isPaused()

isPaused(): Promise<boolean>

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:134

Get the paused state of the contract.

Returns

Promise<boolean>

The paused state of the contract.

shareLockPeriod()

shareLockPeriod(): Promise<bigint>

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:115

Get the share lock period.

Returns

Promise<bigint>

The share lock period.

shareUnlockTime()

shareUnlockTime(walletAddress): Promise<bigint>

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:125

Get the share unlock time for the given wallet address.

Parameters
ParameterTypeDescription
walletAddress`0x${string}`Address of the wallet.
Returns

Promise<bigint>

The share unlock time.

vault()

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

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:106

Get the address of the BoringVault contract.

Returns

Promise<`0x${string}`>

The address of the BoringVault contract.

withToken()

withToken(token): NucleusTellerHandler

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:68

Set the UniFi token to use for executing transactions on the contract.

Parameters
ParameterTypeDescription
tokenUnifiTokenUniFi token to use for the handler.
Returns

NucleusTellerHandler

The handler.

Type Aliases

DepositParams

DepositParams = object

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:15

Properties

PropertyTypeDefined in
accountAddresslib/contracts/handlers/nucleus-teller-handler.ts:16
amountbigintlib/contracts/handlers/nucleus-teller-handler.ts:19
isPreapproved?booleanlib/contracts/handlers/nucleus-teller-handler.ts:21
minimumMintbigintlib/contracts/handlers/nucleus-teller-handler.ts:20
tokenTokenlib/contracts/handlers/nucleus-teller-handler.ts:17
unifiTokenUnifiTokenlib/contracts/handlers/nucleus-teller-handler.ts:18

DepositWithPermitParams

DepositWithPermitParams = PermitData & object

Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:24

Type Declaration

account

account: Address

depositAsset

depositAsset: Address

minimumMint

minimumMint: bigint