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
| Parameter | Type | Description |
|---|---|---|
chain | Chain | Chain to use for the client. |
walletClient | { } | The wallet client to use for wallet interactions. |
publicClient | { } | The public client to use for public interactions. |
Returns
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
| Parameter | Type |
|---|---|
params | BulkDepositParams |
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
| Parameter | Type |
|---|---|
params | BulkWithdrawParams |
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
| Parameter | Type | Description |
|---|---|---|
params | DepositParams | Deposit 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
| Parameter | Type | Description |
|---|---|---|
params | DepositWithPermitParams | Permit 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
| Parameter | Type | Description |
|---|---|---|
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
| Parameter | Type | Description |
|---|---|---|
token | UnifiToken | UniFi token to use for the handler. |
Returns
The handler.
Type Aliases
BulkDepositParams
BulkDepositParams =
object
Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:30
Properties
| Property | Type | Defined in |
|---|---|---|
account | Address | lib/contracts/handlers/nucleus-teller-handler.ts:31 |
depositAmount | bigint | lib/contracts/handlers/nucleus-teller-handler.ts:33 |
depositAsset | Address | lib/contracts/handlers/nucleus-teller-handler.ts:32 |
minimumMint | bigint | lib/contracts/handlers/nucleus-teller-handler.ts:34 |
BulkWithdrawParams
BulkWithdrawParams =
object
Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:37
Properties
| Property | Type | Defined in |
|---|---|---|
account | Address | lib/contracts/handlers/nucleus-teller-handler.ts:38 |
minimumAssets | bigint | lib/contracts/handlers/nucleus-teller-handler.ts:41 |
shareAmount | bigint | lib/contracts/handlers/nucleus-teller-handler.ts:40 |
withdrawAsset | Address | lib/contracts/handlers/nucleus-teller-handler.ts:39 |
DepositParams
DepositParams =
object
Defined in: lib/contracts/handlers/nucleus-teller-handler.ts:15
Properties
| Property | Type | Defined in |
|---|---|---|
account | Address | lib/contracts/handlers/nucleus-teller-handler.ts:16 |
amount | bigint | lib/contracts/handlers/nucleus-teller-handler.ts:19 |
isPreapproved? | boolean | lib/contracts/handlers/nucleus-teller-handler.ts:21 |
minimumMint | bigint | lib/contracts/handlers/nucleus-teller-handler.ts:20 |
token | Token | lib/contracts/handlers/nucleus-teller-handler.ts:17 |
unifiToken | UnifiToken | lib/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