BlockManagerContractRoot.abi.json

Overview

This file defines the Application Binary Interface (ABI) for the BlockManagerContractRoot smart contract. The contract serves as a root manager for block managers within a distributed system, providing core functionalities such as configuration management, node wallet deployment, reward distribution, and lifecycle control. It maintains state variables related to epochs, reward adjustments, active block managers, and contract ownership.

The ABI specifies the contract's external interface including its functions, their inputs and outputs, and the storage fields representing the contract's state. This ABI is essential for interaction with the contract through transactions and calls, enabling other contracts or clients to invoke its methods and read its state.


Contract Structure and State Fields

The contract maintains several persistent state fields which track its configuration, operational parameters, and runtime statistics:


Functions

constructor


setConfig


setConfigNode


closeRoot


setNewCode


increaseBM


deployAckiNackiBlockManagerNodeWallet


slashed


getReward


getAckiNackiBlockManagerNodeWalletAddress


getAckiNackiBlockManagerNodeWalletCode


getCodes


getDetails


getVersion


Implementation Details and Algorithms


Interactions with Other Components


Mermaid Diagram: Contract Structure and Function Overview

classDiagram
class BlockManagerContractRoot {
+constructor()
+setConfig()
+setConfigNode()
+closeRoot()
+setNewCode()
+increaseBM()
+deployAckiNackiBlockManagerNodeWallet()
+slashed()
+getReward()
+getAckiNackiBlockManagerNodeWalletAddress()
+getAckiNackiBlockManagerNodeWalletCode()
+getCodes()
+getDetails()
+getVersion()
-_pubkey: uint256
-_timestamp: uint64
-_constructorFlag: bool
-_code: map(uint8,cell)
-_licenseBMRoot: address
-_numberOfActiveBlockManagers: uint128
-_owner_wallet: optional(address)
-_networkStart: uint32
-_epochDuration: uint64
-_waitStep: uint64
-_prevEpochDuration: uint32
-_epochStart: uint32
-_epochEnd: uint64
-_numberOfActiveBlockManagersAtEpochStart: uint128
-_numberOfActiveBlockManagersAtPrevEpochStart: uint128
-_reward_adjustment: uint128
-_reward_adjustment_prev_epoch: uint128
-_reward_last_time: uint32
-_min_reward_period: uint32
-_reward_period: uint32
-_calc_reward_num: uint32
-_reward_sum: uint128
-_slash_sum: uint128
-_reward_sum_prev_epoch: uint128
-_is_close_owner: bool
-_walletTouch: uint8
}