Nucleus
  • Overview
    • Welcome to Nucleus
    • Official Links
    • FAQ
  • Nucleus Architecture
    • Overview
    • Vault Framework
    • Cross-chain Infrastructure
    • Withdrawals
    • Revenue Strategies
      • Market-agnostic Lending
      • Cross-chain Intents
      • Ownership by Default
    • Reward Distribution
    • Nucleus Points
    • Deployed Assets
    • Smart Contracts
      • README
      • CONTRACTS
        • contents
        • atomic-queue
          • Contents
          • AtomicQueue
          • AtomicSolver
          • AtomicSolverV2
          • AtomicSolverV3
          • IAtomicSolver
        • base
          • Boring Vault
            • BoringVault
          • Decoders and Sanitizers
            • Contents
            • IonPoolDecoderAndSanitizer
          • Roles
            • Contents
            • Cross Chain
              • Cross Chain OP Teller With Multi Asset Support
                • CrossChainOPTellerWithMultiAssetSupport
                • ICrossDomainMessenger
              • Cross Chain Teller Base
                • BridgeData
                • CrossChainTellerBase
              • MultiChainLayerZeroTellerWithMultiAssetSupport
              • Multi Chain Teller Base
                • Chain
                • MultiChainTellerBase
                • MultiChainTellerBase_GasLimitExceeded
                • MultiChainTellerBase_GasTooLow
                • MultiChainTellerBase_MessagesNotAllowedFrom
                • MultiChainTellerBase_MessagesNotAllowedFromSender
                • MultiChainTellerBase_MessagesNotAllowedTo
                • MultiChainTellerBase_ZeroMessageGasLimit
              • OAppAuth
                • Contents
                • OAppAuth
                • OAppAuthCore
                • OAppAuthReceiver
                • OAppAuthSender
            • AccountantWithRateProviders
            • ManagerWithMerkleVerification
            • TellerWithMultiAssetSupport
        • helper
          • Contents
          • Constants
          • ArcticArchitectureLens
          • Deployer
          • GenericRateProvider
        • interfaces
          • BalancerVault
          • AggregationRouterV5
          • BeforeTransferHook
          • DecoderCustomTypes
          • ICreateX
          • IPriceFeed
          • PriceRouter
          • IRateProvider
          • INonFungiblePositionManager
          • Contents
          • IStaking
            • ILiquidityPool
            • ILRTDepositPool
            • IRestakeManager
            • IStaderConfig
            • IStakePoolManager
            • ISTETH
            • ISWETH
            • IUNSTETH
            • IUserWithdrawManager
            • IWEETH
            • IWithdrawRequestNft
            • IWSTETH
          • IUniswap v3 Router
            • IUniswapV3Router
            • IUniswapV3SwapCallback
        • micro-managers
          • Contents
          • DexSwapperUManager
          • DexAggregatorUManager
          • UManager
        • migration
          • Contents
          • CellarMigrationAdaptor
        • oracles
          • EthPerTokenRateProvider
          • Contents
          • EthPerWstEthRateProvider
  • Security
    • Audits
Powered by GitBook
On this page
  • State Variables
  • period
  • allowedCallsPerPeriod
  • callCountPerPeriod
  • manager
  • boringVault
  • Functions
  • enforceRateLimit
  • constructor
  • setPeriod
  • setAllowedCallsPerPeriod
  • revokeTokenApproval
  • Events
  • PeriodUpdated
  • AllowedCallsPeriodUpdated
  • Errors
  • UManager__CallCountExceeded

Was this helpful?

  1. Nucleus Architecture
  2. Smart Contracts
  3. CONTRACTS
  4. micro-managers

UManager

PreviousDexAggregatorUManagerNextmigration

Was this helpful?

Inherits: Auth

State Variables

period

The period in seconds for the rate limit.

uint16 public period;

allowedCallsPerPeriod

The number of calls allowed per period.

uint16 public allowedCallsPerPeriod;

callCountPerPeriod

The number of calls made in the current period.

mapping(uint256 => uint256) public callCountPerPeriod;

manager

The ManagerWithMerkleVerification this uManager works with.

ManagerWithMerkleVerification internal immutable manager;

boringVault

The BoringVault this uManager works with.

address internal immutable boringVault;

Functions

enforceRateLimit

modifier enforceRateLimit();

constructor

constructor(address _owner, address _manager, address _boringVault) Auth(_owner, Authority(address(0)));

setPeriod

Sets the duration of the period.

Callable by MULTISIG_ROLE.

function setPeriod(uint16 _period) external requiresAuth;

setAllowedCallsPerPeriod

Sets the number of calls allowed per period.

Callable by MULTISIG_ROLE.

function setAllowedCallsPerPeriod(uint16 _allowedCallsPerPeriod) external requiresAuth;

revokeTokenApproval

Allows auth to set token approvals to zero.

Callable by STRATEGIST_ROLE.

function revokeTokenApproval(
    bytes32[][] calldata manageProofs,
    address[] calldata decodersAndSanitizers,
    ERC20[] calldata tokens,
    address[] calldata spenders
)
    external
    requiresAuth;

Events

PeriodUpdated

event PeriodUpdated(uint16 oldPeriod, uint16 newPeriod);

AllowedCallsPeriodUpdated

event AllowedCallsPeriodUpdated(uint16 oldAllowance, uint16 newAllowance);

Errors

UManager__CallCountExceeded

error UManager__CallCountExceeded();
Git Source