Amplify
Launch AppGithub
  • Introduction
    • Amplify Overview
    • Concepts
      • Networks
      • DApps
      • Network Investors
      • LPs & Traders
    • Getting Started
      • Networks
      • DApps
      • Investors
  • Developers
    • Smart Contracts
      • VoteEscrowDistribution
      • Voter
      • VoteEscrow
      • Factories
        • Factory
        • IncentivesManagerFactory
        • VoterFactories
        • VoteEscrowFactory
        • GaugeFactory
          • BaseGaugeFactory
        • BribeFactory
          • BaseBribeFactory
      • Bribe
      • Gauge
      • IncentivesManager
    • Deployments
      • Arbitrum Sepolia
  • Resources
    • Brand Assets
    • Bug Bounty
    • Security & Audits
    • Whitelisting
  • Terms of Service
    • Privacy Policy
    • Terms of Use
Powered by GitBook
On this page
  • Description:
  • createGauge
  • createGaugeSingle
  1. Developers
  2. Smart Contracts
  3. Factories

GaugeFactory

Description:

A factory contract for deploying new instances of the Gauge contract. It allows specifying the core parameters (_pool, _bribe, _ve) and either uses the factory caller (msg.sender) as the Voter address or allows specifying it explicitly.


createGauge

function createGauge(address _pool, address _bribe, address _ve) external returns (address)

Description:

Deploys a new Gauge contract instance. The caller (msg.sender) of this function is automatically set as the _voter address within the newly created Gauge. Stores the address of the deployed gauge in last_gauge. Typically called by the main Voter contract.

Input Parameters:

Name
Type
Description

_pool

address

The address of the LP token (stake) for the new Gauge.

_bribe

address

The address of the associated Bribe contract for the new Gauge.

_ve

address

The address of the VotingEscrow contract for the new Gauge.

Return Value:

Type
Description

address

The address of the newly deployed Gauge contract.


createGaugeSingle

function createGaugeSingle(address _pool, address _bribe, address _ve, address _voter) external returns (address)

Description:

Deploys a new Gauge contract instance, allowing the caller to explicitly specify the _voter address. Stores the address of the deployed gauge in last_gauge. Might be used for gauges associated with a different voter or deployed via an alternative mechanism.

Input Parameters:

Name
Type
Description

_pool

address

The address of the LP token (stake) for the new Gauge.

_bribe

address

The address of the associated Bribe contract for the new Gauge.

_ve

address

The address of the VotingEscrow contract for the new Gauge.

_voter

address

The explicit address to set as the Voter for the new Gauge.

Return Value:

Type
Description

address

The address of the newly deployed Gauge contract.

PreviousVoteEscrowFactoryNextBaseGaugeFactory

Last updated 2 months ago