Skip to main content

contracts/handlers/gauge-registry-handler

Classes

GaugeRegistryHandler

Handler for the GaugeRegistry contract exposing methods to interact with the contract.

Constructors

new GaugeRegistryHandler()

new GaugeRegistryHandler(chain, walletClient, publicClient): GaugeRegistryHandler

Create the handler for the GaugeRegistry 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

GaugeRegistryHandler

Source

lib/contracts/handlers/gauge-registry-handler.ts:31

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

acceptOwnership()

acceptOwnership(): Promise<`0x${string}`>

Accept ownership transfer.

Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/gauge-registry-handler.ts:186

activateGauge()

activateGauge(gauge): Promise<`0x${string}`>

Activate a gauge.

Parameters
ParameterTypeDescription
gauge`0x${string}`The gauge address to activate.
Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/gauge-registry-handler.ts:134

deactivateGauge()

deactivateGauge(gauge): Promise<`0x${string}`>

Deactivate a gauge.

Parameters
ParameterTypeDescription
gauge`0x${string}`The gauge address to deactivate.
Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/gauge-registry-handler.ts:147

gaugeExists()

gaugeExists(gauge): Promise<boolean>

Check if a gauge exists.

Parameters
ParameterTypeDescription
gauge`0x${string}`The gauge address to check.
Returns

Promise<boolean>

True if the gauge exists, false otherwise.

Source

lib/contracts/handlers/gauge-registry-handler.ts:81

getContract()

getContract(): object

Get the contract.

Returns

object

The viem contract.

Source

lib/contracts/handlers/gauge-registry-handler.ts:44

getGauge()

getGauge(gauge): Promise<object>

Get gauge information.

Parameters
ParameterTypeDescription
gauge`0x${string}`The gauge address.
Returns

Promise<object>

The gauge information including active status, creation time, and metadata URI.

active

active: boolean

created

created: number

metadataURI

metadataURI: string

Source

lib/contracts/handlers/gauge-registry-handler.ts:101

getGaugeList()

getGaugeList(): Promise<readonly `0x${string}`[]>

Get the list of all gauges.

Returns

Promise<readonly `0x${string}`[]>

Array of gauge addresses.

Source

lib/contracts/handlers/gauge-registry-handler.ts:110

isActive()

isActive(gauge): Promise<boolean>

Check if a gauge is active.

Parameters
ParameterTypeDescription
gauge`0x${string}`The gauge address to check.
Returns

Promise<boolean>

True if the gauge is active, false otherwise.

Source

lib/contracts/handlers/gauge-registry-handler.ts:91

owner()

owner(): Promise<`0x${string}`>

Get the owner of the contract.

Returns

Promise<`0x${string}`>

The owner address.

Source

lib/contracts/handlers/gauge-registry-handler.ts:62

pendingOwner()

pendingOwner(): Promise<`0x${string}`>

Get the pending owner of the contract.

Returns

Promise<`0x${string}`>

The pending owner address.

Source

lib/contracts/handlers/gauge-registry-handler.ts:71

registerGauge()

registerGauge(gauge, metadataURI): Promise<`0x${string}`>

Register a new gauge.

Parameters
ParameterTypeDescription
gauge`0x${string}`The gauge address to register.
metadataURIstringThe metadata URI for the gauge.
Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/gauge-registry-handler.ts:121

renounceOwnership()

renounceOwnership(): Promise<`0x${string}`>

Renounce ownership.

Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/gauge-registry-handler.ts:198

transferOwnership()

transferOwnership(newOwner): Promise<`0x${string}`>

Transfer ownership to a new owner.

Parameters
ParameterTypeDescription
newOwner`0x${string}`The new owner address.
Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/gauge-registry-handler.ts:174

updateGaugeMetadata()

updateGaugeMetadata(gauge, metadataURI): Promise<`0x${string}`>

Update gauge metadata.

Parameters
ParameterTypeDescription
gauge`0x${string}`The gauge address to update.
metadataURIstringThe new metadata URI for the gauge.
Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/gauge-registry-handler.ts:161