Skip to main content

Getter Functions

This section details all available getter functions in the EVVM contract, providing comprehensive information about the contract's state, configuration, and user data.

System Configuration Functions

getEvvmMetadata

Function Type: view
Function Signature: getEvvmMetadata()

Returns the complete EVVM metadata configuration containing system-wide parameters and economic settings.

Return Value

Returns an EvvmMetadata struct containing:

FieldTypeDescription
principalTokenAddressaddressAddress of the principal token (MATE token)
rewarduint256Current reward amount per transaction
totalSupplyuint256Total supply tracking for era transitions
eraTokensuint256Era tokens threshold for reward transitions

getNameServiceAddress

Function Type: view
Function Signature: getNameServiceAddress()

Gets the current NameService contract address used for identity resolution in payments.

Return Value

TypeDescription
addressAddress of the integrated NameService contract

getStakingContractAddress

Function Type: view
Function Signature: getStakingContractAddress()

Gets the authorized staking contract address that can modify staker status and receive rewards.

Return Value

TypeDescription
addressAddress of the integrated staking contract

Nonce Management Functions

getNextCurrentSyncNonce

Function Type: view
Function Signature: getNextCurrentSyncNonce(address)

Returns the expected nonce for the next synchronous payment transaction for a specific user.

Input Parameters

ParameterTypeDescription
useraddressAddress to check sync nonce for

Return Value

TypeDescription
uint256Next synchronous nonce value

getIfUsedAsyncNonce

Function Type: view
Function Signature: getIfUsedAsyncNonce(address,uint256)

Checks if a specific asynchronous nonce has been used by a user to prevent replay attacks.

Input Parameters

ParameterTypeDescription
useraddressAddress to check nonce usage for
nonceuint256Specific nonce value to verify

Return Value

TypeDescription
boolTrue if the nonce has been used, false if available

Balance and Staking Functions

getBalance

Function Type: view
Function Signature: getBalance(address,address)

Gets the balance of a specific token for a user stored in the EVVM system.

Input Parameters

ParameterTypeDescription
useraddressAddress to check balance for
tokenaddressToken contract address to check

Return Value

TypeDescription
uintCurrent token balance for the user

isAddressStaker

Function Type: view
Function Signature: isAddressStaker(address)

Checks if an address is registered as a staker with transaction processing privileges and reward eligibility.

Input Parameters

ParameterTypeDescription
useraddressAddress to check staker status for

Return Value

TypeDescription
boolTrue if the address is a registered staker

Economic System Functions

getEraPrincipalToken

Function Type: view
Function Signature: getEraPrincipalToken()

Gets the current era token threshold that triggers the next reward halving in the deflationary tokenomics system.

Return Value

TypeDescription
uint256Current era tokens threshold

getRewardAmount

Function Type: view
Function Signature: getRewardAmount()

Gets the current MATE token reward amount distributed to stakers for transaction processing.

Return Value

TypeDescription
uint256Current reward amount in MATE tokens

getPrincipalTokenTotalSupply

Function Type: view
Function Signature: getPrincipalTokenTotalSupply()

Gets the total supply of the principal token (MATE) used for era transition calculations.

Return Value

TypeDescription
uint256Total supply of MATE tokens

Token Management Functions

getWhitelistTokenToBeAdded

Function Type: view
Function Signature: getWhitelistTokenToBeAdded()

Gets the address of the token that is pending whitelist approval after the time delay.

Return Value

TypeDescription
addressAddress of the token prepared for whitelisting (zero if none)

getWhitelistTokenToBeAddedDateToSet

Function Type: view
Function Signature: getWhitelistTokenToBeAddedDateToSet()

Gets the acceptance deadline for pending token whitelist proposals.

Return Value

TypeDescription
uint256Timestamp when pending token can be whitelisted (0 if no pending proposal)

Proxy and Governance Functions

getCurrentImplementation

Function Type: view
Function Signature: getCurrentImplementation()

Gets the current active implementation contract address used by the proxy for delegatecalls.

Return Value

TypeDescription
addressAddress of the current implementation contract

getProposalImplementation

Function Type: view
Function Signature: getProposalImplementation()

Gets the proposed implementation contract address pending approval for proxy upgrade.

Return Value

TypeDescription
addressAddress of the proposed implementation contract (zero if none)

getTimeToAcceptImplementation

Function Type: view
Function Signature: getTimeToAcceptImplementation()

Gets the acceptance deadline for the pending implementation upgrade.

Return Value

TypeDescription
uint256Timestamp when implementation upgrade can be executed (0 if no pending proposal)

Administrative Functions

getCurrentAdmin

Function Type: view
Function Signature: getCurrentAdmin()

Gets the current admin address with administrative privileges over the contract.

Return Value

TypeDescription
addressAddress of the current admin

getProposalAdmin

Function Type: view
Function Signature: getProposalAdmin()

Gets the proposed admin address pending approval for admin privileges.

Return Value

TypeDescription
addressAddress of the proposed admin (zero if no pending proposal)

getTimeToAcceptAdmin

Function Type: view
Function Signature: getTimeToAcceptAdmin()

Gets the acceptance deadline for the pending admin change.

Return Value

TypeDescription
uint256Timestamp when admin change can be executed (0 if no pending proposal)

Usage Examples

Checking User Balance

// Check MATE token balance for a user
uint256 mateBalance = evvm.getBalance(userAddress, mateTokenAddress);

// Check if user is a staker
bool isStaker = evvm.isAddressStaker(userAddress);

Nonce Management

// Get next sync nonce for a user
uint256 nextNonce = evvm.getNextCurrentSyncNonce(userAddress);

// Check if async nonce is used
bool nonceUsed = evvm.getIfUsedAsyncNonce(userAddress, customNonce);

Token Management Verification

// Check if token is pending whitelist
address pendingToken = evvm.getWhitelistTokenToBeAdded();

// Get deadline for whitelist proposal
uint256 deadline = evvm.getWhitelistTokenToBeAddedDateToSet();