MobileVerifiersContractRoot.abi.json

Overview

This file defines the Application Binary Interface (ABI) for the Mobile Verifiers Contract Root smart contract. The ABI version is 2, with contract version 2.4. It specifies the contract's external interface including constructors, callable functions, events, and stored fields. This contract manages key functionalities related to Mobile Verifiers, such as reward distribution, code management, and address resolution for subcontracts like PopCoinRoot, MV Multifactor, Popit Games, and Indexers.

The contract operates with a set of core state variables and exposes multiple utility functions for interacting with various Mobile Verifier components. It also includes mechanisms for controlling contract lifecycle events like destruction and code upgrades.


Structure and Components

Header

These headers define the transaction context for contract calls.


Fields

The contract maintains several fields representing its internal state:

Field Name

Type

Initialization

Description

_pubkey

uint256

true

Public key associated with the contract

_timestamp

uint64

false

Last recorded timestamp

_constructorFlag

bool

false

Flag indicating constructor execution

_code

map(uint8,cell)

false

Mapping of contract codes indexed by uint8 IDs

_networkStart

uint32

false

Network start time

_epochStart, _epochEnd

uint32

false

Start and end times of the current epoch

_prevEpochDuration

uint128

false

Duration of the previous epoch

_reward_sum

uint128

false

Sum of rewards

_reward_adjustment

uint128

false

Current reward adjustment factor

_reward_adjustment_prev_epoch

uint128

false

Reward adjustment factor from the previous epoch

_reward_last_time

uint32

false

Timestamp of the last reward calculation

_min_reward_period

uint32

false

Minimum period between rewards

_reward_period

uint32

false

Standard reward period

_sum_coef

uint128

false

Sum of coefficients used in reward calculations

_calc_reward_num

uint32

false

Counter for reward calculations

_last_tap

uint32

false

Timestamp of the last tapping event

MBNLstPrev, MBNLstCur

uint64[]

false

Lists for Mobile Verifier Nodes previous and current

GLstPrev, GLstCur

uint64[]

false

Lists for some groupings (possibly gamified elements)

BCLst

uint64[]

false

Another list related to contract state, exact purpose unspecified


Functions

constructor


popCoinRootDestroyed


setNewCode


destroyNode


sendTapRewards


sendTapRewardsPopit


getPopitGameAddress


getMvMultifactorAddress


getPopCoinRootAddress


getIndexerAddress


getIndexerCode


getCodes


getEpoch


getVersion


getReward


Events

PopCoinRootDestroyed


Implementation Details and Algorithms


Interaction with Other System Components

This contract serves as the root controller for Mobile Verifiers and coordinates with several other contract types:

This contract is central to managing the lifecycle and reward mechanics of Mobile Verifier-related entities, making it a key integration point in the overall system.


Visual Diagram

flowchart TD
constructor -->|Init reward_adjustment| _reward_adjustment
setNewCode -->|Update code map| _code
popCoinRootDestroyed -->|Emit PopCoinRootDestroyed| EventPopCoinRootDestroyed
destroyNode -->|Contract self-destruct| NodeDestroyed
sendTapRewards -->|Send rewards by name| TAPRewardsSent
sendTapRewardsPopit -->|Send rewards with media| TAPRewardsPopitSent
getPopitGameAddress -->|Returns address| PopitGameAddress
getMvMultifactorAddress -->|Returns address| MVMultifactorAddress
getPopCoinRootAddress -->|Returns address| PopCoinRootAddress
getIndexerAddress -->|Returns address| IndexerAddress
getIndexerCode -->|Returns code cell| IndexerCode
getCodes -->|Returns code map| CodeMap
getEpoch -->|Returns epochStart & epochEnd| Epoch
getVersion -->|Returns version strings| Version
getReward -->|Computes reward| RewardValue
EventPopCoinRootDestroyed((PopCoinRootDestroyed))
NodeDestroyed((NodeDestroyed))
TAPRewardsSent((TAPRewardsSent))
TAPRewardsPopitSent((TAPRewardsPopitSent))

The diagram reflects main callable functions and their effect on contract state or outputs, emphasizing code management, reward distribution, and address resolution workflows.