DappRoot.abi.json

Overview

The DappRoot.abi.json file defines the Application Binary Interface (ABI) for the "DappRoot" smart contract. This ABI specifies the contract's functions, state fields, and headers, enabling interaction with the contract on a blockchain platform. The contract is designed to manage deployment and configuration of decentralized application (DApp) components, including code updates, configuration deployment, and lifecycle management.

The ABI version is 2 with a contract version of 2.4. It includes a header specifying pubkey, time, and expire fields, which are used for authentication and transaction timing. The contract maintains internal state fields such as a public key, timestamp, constructor flag, code storage mapping, and a flag indicating ownership status.

Contract Functions

The contract exposes several functions, each with specific responsibilities related to DApp management:

constructor()

setNewCode(id: uint8, code: cell)

deployNewConfigCustom(authorityAddress: optional(address))

deployNewConfig(dapp_id: uint256, is_unlimit: bool, available_balance: int128, authorityAddress: optional(address))

deployNewConfigNode(dapp_id: uint256, is_unlimit: bool, available_balance: int128, authorityAddress: optional(address))

closeRoot()

getConfigAddr(dapp_id: uint256) → address

getDappConfigCode(dapp_id: uint256) → cell

Fields

The contract maintains the following state fields:

Implementation Details and Algorithms

Interaction with Other System Components

Visual Diagram

flowchart TD
A[DappRoot Contract]
A -->|constructor()| Init
A -->|setNewCode()| CodeStorage
A -->|deployNewConfigCustom()| ConfigCustom
A -->|deployNewConfig()| Config
A -->|deployNewConfigNode()| ConfigNode
A -->|closeRoot()| CloseState
A -->|getConfigAddr()| QueryConfigAddr
A -->|getDappConfigCode()| QueryConfigCode
subgraph State Fields
CodeStorage["_codeStorage (map<uint8, cell>)"]
PubKey["_pubkey (uint256)"]
Timestamp["_timestamp (uint64)"]
ConstructorFlag["_constructorFlag (bool)"]
CloseOwner["_is_close_owner (bool)"]
end
Init --> PubKey
Init --> ConstructorFlag
CloseState --> CloseOwner

This diagram illustrates the main functions of the contract and their relation to the key state fields. Functions such as setNewCode update the _codeStorage, while deployment functions create new configuration contracts. Lifecycle functions update ownership and closure status. Query functions access stored data for external use.