Skip to main content

contracts/handlers/l1-reward-manager-handler

Classes

L1RewardManagerHandler

Handler for the L1RewardManager contract.

Constructors

new L1RewardManagerHandler()

new L1RewardManagerHandler(chain, walletClient, publicClient): L1RewardManagerHandler

Create the handler for the L1RewardManager contract exposing methods to interact with the contract.

Parameters
ParameterTypeDescription
chainChainChain to use for the client.
walletClientobjectThe wallet client to use for wallet interactions.
publicClientobjectThe public client to use for public interactions.
Returns

L1RewardManagerHandler

Source

lib/contracts/handlers/l1-reward-manager-handler.ts:28

Properties

PropertyModifierTypeDescription
chainprivateChainChain to use for the client.
publicClientprivateobjectThe public client to use for public interactions.
viemChainprivateChain-
walletClientprivateobjectThe wallet client to use for wallet interactions.

Methods

getBridge()

getBridge(bridgeAddress): Promise<object>

Get the bridge data for the given bridge address.

Parameters
ParameterTypeDescription
bridgeAddress`0x${string}`Address of the bridge.
Returns

Promise<object>

The bridge data.

destinationDomainId

destinationDomainId: number

Source

lib/contracts/handlers/l1-reward-manager-handler.ts:60

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/l1-reward-manager-handler.ts:42

setL2RewardClaimer()

setL2RewardClaimer(account, bridge, claimer): object

Sets the rewards claimer on L2. Smart contracts might not be able to to own the same address on L2. This function allows to set a different address as the claimer.

Parameters
ParameterTypeDescription
account`0x${string}`The account to make the transaction with.
bridge`0x${string}`Address of the bridge.
claimer`0x${string}`Address of the new claimer.
Returns

object

transact: () => Promise<Address> - Used to make the transaction.

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/l1-reward-manager-handler.ts:78