Mellow Protocol
  • 💡Welcome to Mellow
  • Mellow Vaults Overview
  • Security
  • User Tutorials
    • Deposit guide
    • Withdrawal guide
  • 🔳Simple LRT
    • Overview
  • Architecture
  • Deployments
  • 🍱MultiVault
    • Overview
    • Architecture
  • Deployments
  • 💧DVstETH vault
    • Overview
    • Architecture
    • Contracts specs
      • 🏦Vault
      • 🔧VaultConfigurator
      • ⚖️Validators
        • ManagedValidator
        • ERC20SwapValidator
        • DefaultBondValidator
        • AllowAllValidator
      • 🧬Strategies
        • DefaultBondStrategy
        • SimpleDVTStakingStrategy
      • 🔎Oracles
        • ChainlinkOracle
        • ManagedRatiosOracle
      • 🧱Modules
        • DelegateModules
          • ERC20SwapModule
          • DefaultBondModule
          • StakingModule
        • ExternalModules
        • TvlModules
          • DefaultBondTvlModule
          • ERC20TvlModule
          • ManagedTvlModule
      • 🪛Utils
        • DepositWrapper
        • DefaultAccessControl
      • 🔐Security
        • AdminProxy
  • Deployment
    • Emergency withdrawal guide (advanced)
  • 🖇️Interoperable vaults
    • Overview
    • Architecture
    • Deployments
  • 🤖MELLOW ALM
    • Mellow Permissionless Vaults
      • Core
      • Contracts API
      • Strategies
        • Fearless Gearbox strategy
        • LStrategy
        • Uni V3 Boosted strategy
        • Pulse strategy
        • Pulse strategy V2
        • Tamper strategy
      • Governance parameters
      • Contracts specs
      • Tutorials
        • Contracts deployments
        • Deploy your own strategy
        • wstETH strategies deposit guide
      • Mellow contracts addresses
        • Mellow Protocol Addresses (Polygon)
        • Mellow Protocol Addresses (Mainnet)
        • Gearbox Fearless Strategy
        • Tamper Strategy
        • UniV3 Pulse wstETH-USDC
        • UniV3 Pulse V2 wstETH-USDC
        • Velodrome CL strategies
        • Aerodrome CL strategies
      • Glossary
      • FAQ
    • Mellow ALM Toolkit
      • 📘Domain objects
      • 🧩Components
      • 🍜Processes
      • 💎Core
      • 🔮Oracles
        • VeloOracle
      • 🎯Strategy
        • PulseStrategyModule
      • 🔌AMM Adapters
        • VeloAmmModule
      • 🚙Utility contracts
        • AmmDepositWithdrawModule
        • Counter
        • LpWrapper
        • VeloDeployFactory
    • Mellow Backtesting SDK
  • 📍Points
    • Overview
    • Points in Symbiotic pre-deposit contracts
    • DeFi points integration instructions
  • 🗄️Resources
    • API
    • Media kit
    • Twitter
    • Discord
Powered by GitBook
On this page
  1. MELLOW ALM
  2. Mellow ALM Toolkit
  3. Utility contracts

Counter

Designed to maintain a count, Counter offers functionality to incrementally update a value and manage access through ownership and operator privileges. This can be used in scenarios requiring tallying, tracking usage or interactions, and other numerical record-keeping in smart contracts.

Functions

value()

  • Description: Retrieves the current value of the counter.

  • Returns: uint256 representing the current counter value.

owner()

  • Description: Fetches the address recognized as the owner of the counter.

  • Returns: Address of the current owner.

operator()

  • Description: Obtains the address designated as the operator of the counter, who is permitted to perform specific actions like adding to the counter.

  • Returns: Operator's address.

transferOwnership(address newOwner)

  • Description: Assigns ownership of the counter to a new address, transferring all associated control and privileges.

  • Parameters:

    • newOwner: The address to be assigned as the new owner of the counter.

  • Restrictions: Can only be executed by the current owner.

add(uint256 additionalValue)

  • Description: Increments the counter by a specified value.

  • Parameters:

    • additionalValue: The amount by which to increase the counter.

  • Restrictions: Can only be executed by the current operator.

reset()

  • Description: Resets the counter value to zero, effectively restarting any count or tally being maintained.

  • Restrictions: Can only be executed by the current owner.

PreviousAmmDepositWithdrawModuleNextLpWrapper

Last updated 1 year ago

🤖
🚙