contracts/handlers/nucleus-teller-handler
Classes
NucleusTellerHandler
Handler for the Teller
contract from nucleus.
Constructors
new NucleusTellerHandler()
new NucleusTellerHandler(
chain
,walletClient
,publicClient
):NucleusTellerHandler
Create the handler for processing tokens.
Parameters
Parameter | Type | Description |
---|---|---|
chain | Chain | Chain to use for the client. |
walletClient | object | The wallet client to use for wallet interactions. |
publicClient | object | The public client to use for public interactions. |
Returns
Source
lib/contracts/handlers/nucleus-teller-handler.ts:50
Properties
Property | Modifier | Type | Description |
---|---|---|---|
chain | private | Chain | Chain to use for the client. |
erc20PermitHandler | private | ERC20PermitHandler | - |
publicClient | private | object | The public client to use for public interactions. |
viemChain | private | Chain | - |
walletClient | private | object | The wallet client to use for wallet interactions. |
Methods
accountant()
accountant():
Promise
<`0x${string}`>
Get the address of the Accountant
contract.
Returns
Promise
<`0x${string}`>
The address of the Accountant
contract.
Source
lib/contracts/handlers/nucleus-teller-handler.ts:86
deposit()
deposit(
params
):Promise
<object
>
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
<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}`>
Source
lib/contracts/handlers/nucleus-teller-handler.ts:145
depositWithPermit()
depositWithPermit(
params
):object
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}`>
Source
lib/contracts/handlers/nucleus-teller-handler.ts:224
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-teller-handler.ts:69
isPaused()
isPaused():
Promise
<boolean
>
Get the paused state of the contract.
Returns
Promise
<boolean
>
The paused state of the contract.
Source
lib/contracts/handlers/nucleus-teller-handler.ts:123
shareLockPeriod()
shareLockPeriod():
Promise
<bigint
>
Get the share lock period.
Returns
Promise
<bigint
>
The share lock period.
Source
lib/contracts/handlers/nucleus-teller-handler.ts:104
shareUnlockTime()
shareUnlockTime(
walletAddress
):Promise
<bigint
>
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.
Source
lib/contracts/handlers/nucleus-teller-handler.ts:114
vault()
vault():
Promise
<`0x${string}`>
Get the address of the BoringVault
contract.
Returns
Promise
<`0x${string}`>
The address of the BoringVault
contract.
Source
lib/contracts/handlers/nucleus-teller-handler.ts:95
Type Aliases
DepositParams
DepositParams:
object
Type declaration
account
account:
Address
amount
amount:
bigint
isPreapproved?
optional
isPreapproved:boolean
minimumMint
minimumMint:
bigint
token
token:
Token
unifiToken
unifiToken:
UnifiToken
Source
lib/contracts/handlers/nucleus-teller-handler.ts:14
DepositWithPermitParams
DepositWithPermitParams:
object
Type declaration
account
account:
Address
deadline
deadline:
bigint
depositAmount
depositAmount:
bigint
depositAsset
depositAsset:
Address
minimumMint
minimumMint:
bigint
r
r:
Address
s
s:
Address
v
v:
number