contracts/handlers/validator-ticket-handler
Classes
ValidatorTicketHandler
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:18
Handler for the ValidatorTicket contract exposing methods to interact
with the contract.
Constructors
Constructor
new ValidatorTicketHandler(
chain,walletClient,publicClient):ValidatorTicketHandler
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:31
Create the handler for the ValidatorTicket contract exposing
methods to interact with the contract.
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
approve()
approve(
spender,amount):Promise<`0x${string}`>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:120
Approve a spender to spend the validator ticket.
Parameters
| Parameter | Type | Description |
|---|---|---|
spender | `0x${string}` | The spender of the validator ticket. |
amount | bigint | The amount to approve. |
Returns
Promise<`0x${string}`>
The transaction.
burn()
burn(
amount):Promise<`0x${string}`>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:163
Burn validator tickets.
Parameters
| Parameter | Type | Description |
|---|---|---|
amount | bigint | The amount to burn. |
Returns
Promise<`0x${string}`>
The transaction.
getAllowance()
getAllowance(
owner,spender):Promise<bigint>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:134
Get the allowance of the owner for the spender.
Parameters
| Parameter | Type | Description |
|---|---|---|
owner | `0x${string}` | The owner of the allowance. |
spender | `0x${string}` | The spender of the allowance. |
Returns
Promise<bigint>
The allowance.
getBalance()
getBalance(
address):Promise<bigint>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:144
Get the balance for the address.
Parameters
| Parameter | Type | Description |
|---|---|---|
address | `0x${string}` | The address to get the balance of. |
Returns
Promise<bigint>
The balance.
getContract()
getContract():
object
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:44
Get the contract.
Returns
object
The viem contract.
getDecimals()
getDecimals():
Promise<number>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:298
Get the decimals of the token.
Returns
Promise<number>
The token decimals.
getDomainSeparator()
getDomainSeparator():
Promise<`0x${string}`>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:222
Get the domain separator for EIP-712 signatures.
Returns
Promise<`0x${string}`>
The domain separator.
getEip712Domain()
getEip712Domain():
Promise<readonly [`0x${string}`,string,string,bigint,`0x${string}`,`0x${string}`, readonlybigint[]]>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:271
Get the EIP-712 domain information.
Returns
Promise<readonly [`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, readonly bigint[]]>
The EIP-712 domain information.
getGuardiansFeeRate()
getGuardiansFeeRate():
Promise<bigint>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:204
Get the guardians fee rate.
Returns
Promise<bigint>
The guardians fee rate.
getName()
getName():
Promise<string>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:280
Get the name of the token.
Returns
Promise<string>
The token name.
getNonce()
getNonce(
owner):Promise<bigint>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:232
Get the nonce for an owner.
Parameters
| Parameter | Type | Description |
|---|---|---|
owner | `0x${string}` | The owner address. |
Returns
Promise<bigint>
The nonce.
getProtocolFeeRate()
getProtocolFeeRate():
Promise<bigint>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:213
Get the protocol fee rate.
Returns
Promise<bigint>
The protocol fee rate.
getSymbol()
getSymbol():
Promise<string>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:289
Get the symbol of the token.
Returns
Promise<string>
The token symbol.
getTotalSupply()
getTotalSupply():
Promise<bigint>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:153
Get the total supply of the validator ticket.
Returns
Promise<bigint>
The total supply.
permit()
permit(
owner,spender,value,deadline,v,r,s):Promise<`0x${string}`>
Defined in: lib/contracts/handlers/validator-ticket-handler.ts:248
Permit function for EIP-2612 approval.