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
| 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: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
| 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:235
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: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
| 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: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
| Parameter | Type | Description |
|---|---|---|
token | UnifiToken | UniFi token to use for the handler. |
Returns
The handler.
Type Aliases
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