Quantillon Protocol

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IQEUROToken

Git Source

Author: Quantillon Labs - Nicolas Bellengé - @chewbaccoin

Read-only interface for the QEURO token

Exposes ERC20 metadata and helper views used by integrators

Note: security-contact: team@quantillon.money

Functions

name

Token name

Returns the name of the QEURO token

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function name() external view returns (string memory);

Returns

NameTypeDescription
<none>stringname The token name string

symbol

Token symbol

Returns the symbol of the QEURO token

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function symbol() external view returns (string memory);

Returns

NameTypeDescription
<none>stringsymbol The token symbol string

decimals

Token decimals (always 18)

Returns the number of decimals used by the token

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function decimals() external view returns (uint8);

Returns

NameTypeDescription
<none>uint8decimals The number of decimals (always 18)

totalSupply

Total token supply

Returns the total supply of QEURO tokens

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function totalSupply() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256totalSupply The total supply (18 decimals)

balanceOf

Balance of an account

Returns the token balance of the specified account

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function balanceOf(address account) external view returns (uint256);

Parameters

NameTypeDescription
accountaddressAddress to query

Returns

NameTypeDescription
<none>uint256balance The token balance (18 decimals)

isMinter

Whether an address has the minter role

Checks if the specified account has the MINTER_ROLE

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function isMinter(address account) external view returns (bool);

Parameters

NameTypeDescription
accountaddressAddress to check

Returns

NameTypeDescription
<none>boolisMinter True if the account has the minter role

isBurner

Whether an address has the burner role

Checks if the specified account has the BURNER_ROLE

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function isBurner(address account) external view returns (bool);

Parameters

NameTypeDescription
accountaddressAddress to check

Returns

NameTypeDescription
<none>boolisBurner True if the account has the burner role

getSupplyUtilization

Percentage of max supply utilized (basis points)

Returns the percentage of maximum supply currently in circulation

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function getSupplyUtilization() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256utilization Percentage of max supply utilized (basis points)

getTokenInfo

Aggregated token information snapshot

Returns comprehensive token information in a single call

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function getTokenInfo()
    external
    view
    returns (
        string memory name_,
        string memory symbol_,
        uint8 decimals_,
        uint256 totalSupply_,
        uint256 maxSupply_,
        bool isPaused_,
        bool whitelistEnabled_,
        uint256 mintRateLimit_,
        uint256 burnRateLimit_
    );

Returns

NameTypeDescription
name_stringToken name
symbol_stringToken symbol
decimals_uint8Token decimals
totalSupply_uint256Current total supply
maxSupply_uint256Maximum supply cap
isPaused_boolWhether the token is paused
whitelistEnabled_boolWhether whitelist mode is active
mintRateLimit_uint256Current mint rate limit per hour
burnRateLimit_uint256Current burn rate limit per hour

initialize

Initialize the QEURO token contract

Sets up initial roles and configuration for the token

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function initialize(address admin, address vault, address timelock, address treasury) external;

Parameters

NameTypeDescription
adminaddressAddress of the admin role
vaultaddressAddress of the vault contract
timelockaddressAddress of the timelock contract
treasuryaddressTreasury address

mint

Mint new QEURO tokens to an address

Creates new tokens and adds them to the specified address

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function mint(address to, uint256 amount) external;

Parameters

NameTypeDescription
toaddressAddress to receive the minted tokens
amountuint256Amount of tokens to mint (18 decimals)

burn

Burn QEURO tokens from an address

Destroys tokens from the specified address

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function burn(address from, uint256 amount) external;

Parameters

NameTypeDescription
fromaddressAddress to burn tokens from
amountuint256Amount of tokens to burn (18 decimals)

batchMint

Mint new QEURO tokens to multiple addresses

Creates new tokens and distributes them to multiple recipients

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function batchMint(address[] calldata recipients, uint256[] calldata amounts) external;

Parameters

NameTypeDescription
recipientsaddress[]Array of addresses to receive the minted tokens
amountsuint256[]Array of amounts to mint for each recipient (18 decimals)

batchBurn

Burn QEURO tokens from multiple addresses

Destroys tokens from multiple addresses

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function batchBurn(address[] calldata froms, uint256[] calldata amounts) external;

Parameters

NameTypeDescription
fromsaddress[]Array of addresses to burn tokens from
amountsuint256[]Array of amounts to burn from each address (18 decimals)

batchTransfer

Transfer QEURO tokens to multiple addresses

Transfers tokens from the caller to multiple recipients

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function batchTransfer(address[] calldata recipients, uint256[] calldata amounts) external returns (bool);

Parameters

NameTypeDescription
recipientsaddress[]Array of addresses to receive the tokens
amountsuint256[]Array of amounts to transfer to each recipient (18 decimals)

Returns

NameTypeDescription
<none>boolsuccess True if all transfers were successful

updateRateLimits

Update rate limits for minting and burning operations

Modifies the maximum amount of tokens that can be minted or burned per hour

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function updateRateLimits(uint256 newMintLimit, uint256 newBurnLimit) external;

Parameters

NameTypeDescription
newMintLimituint256New maximum amount of tokens that can be minted per hour (18 decimals)
newBurnLimituint256New maximum amount of tokens that can be burned per hour (18 decimals)

blacklistAddress

Add an address to the blacklist with a reason

Prevents the specified address from participating in token operations

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function blacklistAddress(address account, string memory reason) external;

Parameters

NameTypeDescription
accountaddressAddress to blacklist
reasonstringReason for blacklisting the address

unblacklistAddress

Remove an address from the blacklist

Allows the specified address to participate in token operations again

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function unblacklistAddress(address account) external;

Parameters

NameTypeDescription
accountaddressAddress to remove from blacklist

whitelistAddress

Add an address to the whitelist

Allows the specified address to participate in token operations when whitelist mode is enabled

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function whitelistAddress(address account) external;

Parameters

NameTypeDescription
accountaddressAddress to whitelist

unwhitelistAddress

Remove an address from the whitelist

Prevents the specified address from participating in token operations when whitelist mode is enabled

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function unwhitelistAddress(address account) external;

Parameters

NameTypeDescription
accountaddressAddress to remove from whitelist

toggleWhitelistMode

Toggle whitelist mode on or off

When enabled, only whitelisted addresses can participate in token operations

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function toggleWhitelistMode(bool enabled) external;

Parameters

NameTypeDescription
enabledboolTrue to enable whitelist mode, false to disable

batchBlacklistAddresses

Add multiple addresses to the blacklist with reasons

Batch operation to blacklist multiple addresses efficiently

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function batchBlacklistAddresses(address[] calldata accounts, string[] calldata reasons) external;

Parameters

NameTypeDescription
accountsaddress[]Array of addresses to blacklist
reasonsstring[]Array of reasons for blacklisting each address

batchUnblacklistAddresses

Remove multiple addresses from the blacklist

Batch operation to unblacklist multiple addresses efficiently

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function batchUnblacklistAddresses(address[] calldata accounts) external;

Parameters

NameTypeDescription
accountsaddress[]Array of addresses to remove from blacklist

batchWhitelistAddresses

Add multiple addresses to the whitelist

Batch operation to whitelist multiple addresses efficiently

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function batchWhitelistAddresses(address[] calldata accounts) external;

Parameters

NameTypeDescription
accountsaddress[]Array of addresses to whitelist

batchUnwhitelistAddresses

Remove multiple addresses from the whitelist

Batch operation to unwhitelist multiple addresses efficiently

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function batchUnwhitelistAddresses(address[] calldata accounts) external;

Parameters

NameTypeDescription
accountsaddress[]Array of addresses to remove from whitelist

updateMinPricePrecision

Update the minimum price precision for oracle feeds

Sets the minimum number of decimal places required for price feeds

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function updateMinPricePrecision(uint256 newPrecision) external;

Parameters

NameTypeDescription
newPrecisionuint256New minimum precision value (number of decimal places)

normalizePrice

Normalize price from different decimal precisions to 18 decimals

Converts price from source feed decimals to standard 18 decimal format

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function normalizePrice(uint256 price, uint8 feedDecimals) external pure returns (uint256);

Parameters

NameTypeDescription
priceuint256Price value to normalize
feedDecimalsuint8Number of decimal places in the source feed

Returns

NameTypeDescription
<none>uint256normalizedPrice Price normalized to 18 decimals

validatePricePrecision

Validate if price precision meets minimum requirements

Checks if the price feed has sufficient decimal precision

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function validatePricePrecision(uint256 price, uint8 feedDecimals) external view returns (bool);

Parameters

NameTypeDescription
priceuint256Price value to validate
feedDecimalsuint8Number of decimal places in the price feed

Returns

NameTypeDescription
<none>boolisValid True if precision meets minimum requirements

pause

Pause all token operations

Emergency function to halt all token transfers, minting, and burning

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function pause() external;

unpause

Unpause all token operations

Resumes normal token operations after emergency pause

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function unpause() external;

recoverToken

Recover accidentally sent tokens

Allows recovery of ERC20 tokens sent to the contract by mistake

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function recoverToken(address token, uint256 amount) external;

Parameters

NameTypeDescription
tokenaddressAddress of the token to recover
amountuint256Amount of tokens to recover

recoverETH

Recover accidentally sent ETH

Allows recovery of ETH sent to the contract by mistake

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function recoverETH() external;

updateMaxSupply

Update the maximum supply of QEURO tokens

Sets a new maximum supply limit for the token

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function updateMaxSupply(uint256 newMaxSupply) external;

Parameters

NameTypeDescription
newMaxSupplyuint256New maximum supply limit (18 decimals)

transfer

Transfer QEURO tokens to another address

Standard ERC20 transfer function with compliance checks

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function transfer(address to, uint256 amount) external returns (bool);

Parameters

NameTypeDescription
toaddressAddress to transfer tokens to
amountuint256Amount of tokens to transfer (18 decimals)

Returns

NameTypeDescription
<none>boolsuccess True if transfer was successful

allowance

Get the allowance for a spender

Returns the amount of tokens that a spender is allowed to transfer

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function allowance(address owner, address spender) external view returns (uint256);

Parameters

NameTypeDescription
owneraddressAddress of the token owner
spenderaddressAddress of the spender

Returns

NameTypeDescription
<none>uint256allowance Amount of tokens the spender can transfer (18 decimals)

approve

Approve a spender to transfer tokens

Sets the allowance for a spender to transfer tokens on behalf of the caller

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function approve(address spender, uint256 amount) external returns (bool);

Parameters

NameTypeDescription
spenderaddressAddress of the spender to approve
amountuint256Amount of tokens to approve (18 decimals)

Returns

NameTypeDescription
<none>boolsuccess True if approval was successful

transferFrom

Transfer tokens from one address to another

Standard ERC20 transferFrom function with compliance checks

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function transferFrom(address from, address to, uint256 amount) external returns (bool);

Parameters

NameTypeDescription
fromaddressAddress to transfer tokens from
toaddressAddress to transfer tokens to
amountuint256Amount of tokens to transfer (18 decimals)

Returns

NameTypeDescription
<none>boolsuccess True if transfer was successful

hasRole

Check if an address has a specific role

Returns true if the account has the specified role

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function hasRole(bytes32 role, address account) external view returns (bool);

Parameters

NameTypeDescription
rolebytes32Role to check for
accountaddressAddress to check

Returns

NameTypeDescription
<none>boolhasRole True if the account has the role

getRoleAdmin

Get the admin role for a specific role

Returns the role that is the admin of the given role

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function getRoleAdmin(bytes32 role) external view returns (bytes32);

Parameters

NameTypeDescription
rolebytes32Role to get admin for

Returns

NameTypeDescription
<none>bytes32adminRole The admin role

grantRole

Grant a role to an address

Assigns the specified role to the given account

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function grantRole(bytes32 role, address account) external;

Parameters

NameTypeDescription
rolebytes32Role to grant
accountaddressAddress to grant the role to

revokeRole

Revoke a role from an address

Removes the specified role from the given account

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function revokeRole(bytes32 role, address account) external;

Parameters

NameTypeDescription
rolebytes32Role to revoke
accountaddressAddress to revoke the role from

renounceRole

Renounce a role

Removes the specified role from the caller

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function renounceRole(bytes32 role, address callerConfirmation) external;

Parameters

NameTypeDescription
rolebytes32Role to renounce
callerConfirmationaddressAddress of the caller (for security)

paused

Check if the contract is paused

Returns true if all token operations are paused

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function paused() external view returns (bool);

Returns

NameTypeDescription
<none>boolisPaused True if the contract is paused

upgradeTo

Upgrade the contract implementation

Upgrades to a new implementation address

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function upgradeTo(address newImplementation) external;

Parameters

NameTypeDescription
newImplementationaddressAddress of the new implementation

upgradeToAndCall

Upgrade the contract implementation and call a function

Upgrades to a new implementation and executes a function call

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function upgradeToAndCall(address newImplementation, bytes memory data) external payable;

Parameters

NameTypeDescription
newImplementationaddressAddress of the new implementation
databytesEncoded function call data

MINTER_ROLE

Get the MINTER_ROLE constant

Returns the role hash for minters

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function MINTER_ROLE() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32role The MINTER_ROLE bytes32 value

BURNER_ROLE

Get the BURNER_ROLE constant

Returns the role hash for burners

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function BURNER_ROLE() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32role The BURNER_ROLE bytes32 value

PAUSER_ROLE

Get the PAUSER_ROLE constant

Returns the role hash for pausers

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function PAUSER_ROLE() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32role The PAUSER_ROLE bytes32 value

UPGRADER_ROLE

Get the UPGRADER_ROLE constant

Returns the role hash for upgraders

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function UPGRADER_ROLE() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32role The UPGRADER_ROLE bytes32 value

COMPLIANCE_ROLE

Get the COMPLIANCE_ROLE constant

Returns the role hash for compliance officers

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function COMPLIANCE_ROLE() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32role The COMPLIANCE_ROLE bytes32 value

DEFAULT_MAX_SUPPLY

Get the DEFAULT_MAX_SUPPLY constant

Returns the default maximum supply limit

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function DEFAULT_MAX_SUPPLY() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256maxSupply The default maximum supply (18 decimals)

MAX_RATE_LIMIT

Get the MAX_RATE_LIMIT constant

Returns the maximum rate limit value

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function MAX_RATE_LIMIT() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256maxLimit The maximum rate limit (18 decimals)

PRECISION

Get the PRECISION constant

Returns the precision value used for calculations

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function PRECISION() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256precision The precision value (18 decimals)

maxSupply

Get the current maximum supply limit

Returns the maximum number of tokens that can be minted

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function maxSupply() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256maxSupply Current maximum supply limit (18 decimals)

mintRateLimit

Get the current mint rate limit

Returns the maximum amount of tokens that can be minted per hour

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function mintRateLimit() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256mintLimit Current mint rate limit (18 decimals)

burnRateLimit

Get the current burn rate limit

Returns the maximum amount of tokens that can be burned per hour

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function burnRateLimit() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256burnLimit Current burn rate limit (18 decimals)

currentHourMinted

Get the amount minted in the current hour

Returns the total amount of tokens minted in the current rate limit window

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function currentHourMinted() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256minted Current hour minted amount (18 decimals)

currentHourBurned

Get the amount burned in the current hour

Returns the total amount of tokens burned in the current rate limit window

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function currentHourBurned() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256burned Current hour burned amount (18 decimals)

lastRateLimitReset

Get the timestamp of the last rate limit reset

Returns when the rate limit counters were last reset

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function lastRateLimitReset() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256resetTime Timestamp of last rate limit reset

isBlacklisted

Check if an address is blacklisted

Returns true if the address is on the blacklist

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function isBlacklisted(address account) external view returns (bool);

Parameters

NameTypeDescription
accountaddressAddress to check

Returns

NameTypeDescription
<none>boolisBlacklisted True if the address is blacklisted

isWhitelisted

Check if an address is whitelisted

Returns true if the address is on the whitelist

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function isWhitelisted(address account) external view returns (bool);

Parameters

NameTypeDescription
accountaddressAddress to check

Returns

NameTypeDescription
<none>boolisWhitelisted True if the address is whitelisted

whitelistEnabled

Check if whitelist mode is enabled

Returns true if whitelist mode is active

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function whitelistEnabled() external view returns (bool);

Returns

NameTypeDescription
<none>boolenabled True if whitelist mode is enabled

minPricePrecision

Get the minimum price precision requirement

Returns the minimum number of decimal places required for price feeds

Notes:

  • security: Validates input parameters and enforces security checks

  • validation: Validates input parameters and business logic constraints

  • state-changes: Updates contract state variables

  • events: Emits relevant events for state changes

  • errors: Throws custom errors for invalid conditions

  • reentrancy: Protected by reentrancy guard

  • access: Restricted to authorized roles

  • oracle: Requires fresh oracle price data

function minPricePrecision() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256precision Minimum price precision value