Skip to main content

contracts/handlers/nucleus-teller-handler

Classes​

NucleusTellerHandler​

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

Handler for the Teller contract from nucleus.

Constructors​

Constructor​

new NucleusTellerHandler(chain, walletClient, publicClient): NucleusTellerHandler

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

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:111

Get the address of the Accountant contract.

Returns​

Promise<`0x${string}`>

The address of the Accountant contract.

bulkDeposit()​

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

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

Parameters​
ParameterType
paramsBulkDepositParams
Returns​

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

bulkWithdraw()​

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

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

Parameters​
ParameterType
paramsBulkWithdrawParams
Returns​

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

deposit()​

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

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

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:249

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:93

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:148

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:129

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:139

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:120

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:82

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​

BulkDepositParams​

BulkDepositParams = object

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

Properties​

PropertyTypeDefined in
accountAddresslib/contracts/handlers/nucleus-teller-handler.ts:31
depositAmountbigintlib/contracts/handlers/nucleus-teller-handler.ts:33
depositAssetAddresslib/contracts/handlers/nucleus-teller-handler.ts:32
minimumMintbigintlib/contracts/handlers/nucleus-teller-handler.ts:34

BulkWithdrawParams​

BulkWithdrawParams = object

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

Properties​

PropertyTypeDefined in
accountAddresslib/contracts/handlers/nucleus-teller-handler.ts:38
minimumAssetsbigintlib/contracts/handlers/nucleus-teller-handler.ts:41
shareAmountbigintlib/contracts/handlers/nucleus-teller-handler.ts:40
withdrawAssetAddresslib/contracts/handlers/nucleus-teller-handler.ts:39

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