Mirror.abi.json

Overview

Mirror.abi.json defines the Application Binary Interface (ABI) for a smart contract, specifying its version, header fields, state variables, and the externally callable functions. The contract is designed to manage and deploy various related contracts or modules, including multifactor authentication contracts, game deployments, and token roots. It contains administrative functions to update contract state and deploy subcontracts, reflecting a modular and extensible architecture.

This ABI is structured to support interactions requiring cryptographic keys, proofs, and metadata, indicating usage in security-sensitive or identity-related decentralized applications. The contract maintains ownership and control through public keys and supports dynamic code updates via a code map.

ABI Structure and Components

ABI Metadata

State Variables (Fields)

Field Name

Type

Initialization

Description

_pubkey

uint256

Yes

Public key of the contract owner used for signature verification.

_timestamp

uint64

No

Tracks the last update or deployment timestamp.

_constructorFlag

bool

No

Indicates if the constructor has been executed.

_root

address

No

Root address related to the contract's deployment hierarchy.

_index

uint128

No

Index identifier, likely used for versioning or enumeration.

_rootPubkey

uint256

No

Public key associated with the root address or entity.

_code

map(uint8,cell)

No

Mapping of code versions or modules identified by a numeric key.

Functions

constructor(root: address, index: uint128, rootPubkey: uint256)

setNewIndex(index: uint128)

setNewCode(id: uint8, code: cell)

destroyNode()

deployPopitGame(pubkey: uint256)

deployMultifactor(name: string, zkid: string, proof: bytes, epk: uint256, epk_sig: bytes, epk_expire_at: uint64, jwk_modulus: bytes, kid: bytes, jwk_modulus_expire_at: uint64, index_mod_4: uint8, iss_base_64: string, provider: string, header_base_64: string, pub_recovery_key: uint256, pub_recovery_key_sig: bytes, jwk_update_key: uint256, jwk_update_key_sig: bytes, root_provider_certificates: map(uint256, bytes))

isDeployMultifactor(name: string, ready: bool, zkid: string, proof: bytes, epk: uint256, epk_sig: bytes, epk_expire_at: uint64, jwk_modulus: bytes, kid: bytes, jwk_modulus_expire_at: uint64, index_mod_4: uint8, iss_base_64: string, provider: string, header_base_64: string, pub_recovery_key: uint256, pub_recovery_key_sig: bytes, jwk_update_key: uint256, jwk_update_key_sig: bytes, root_provider_certificates: map(uint256, bytes), owner_pubkey: uint256)

updateWhiteList(pubkey: uint256, index: uint8, name: string)

deployPopCoinRoot(name: string, maxPopitIndex: uint16, popits_media: map(uint16, tuple(media: string, id: uint256, protopopit: optional(uint32))), description: string, isPublic: bool, popitGameOwner: address)

getVersion()

Implementation Details

Interaction with Other Contracts and System Components

Visual Diagram

flowchart TD
A[constructor] --> B[setNewIndex]
A --> C[setNewCode]
A --> D[destroyNode]
A --> E[deployPopitGame]
A --> F[deployMultifactor]
F --> G[isDeployMultifactor]
A --> H[updateWhiteList]
A --> I[deployPopCoinRoot]
A --> J[getVersion]

For further understanding of cryptographic key management and contract deployment patterns, see Public Key Cryptography and Smart Contract Deployment. For more on data structures like maps and tuples used here, reference Data Structures in Smart Contracts.