LicenseRoot.abi.json

Overview

The LicenseRoot.abi.json file defines the Application Binary Interface (ABI) for a smart contract that manages licenses and license owners within a system. This ABI specifies the contract's interface including its functions, fields, and their types, enabling interaction with the contract on a blockchain platform. The contract appears to handle deployment and management of different license types, including standard licenses and BM (presumably Business Model or another category) licenses, as well as managing ownership and code updates for licenses.

The ABI version is 2 and it uses version "2.4" of the contract interface specification. The contract expects a header containing pubkey, time, and expire fields for transaction or message validation.


Detailed Description of Functions

1. constructor

2. deployLicense

3. deployLicenseOwner

4. deployLicenseBM

5. deployLicenseBMOwner

6. setNewCode

7. getLastLicenseNum

8. getLicenseAddress

9. getLicenseBMAddress

10. getVersion


Fields

Field Name

Type

Initialized

Description

_pubkey

uint256

Yes

Public key of the contract deployer or owner.

_timestamp

uint64

No

Timestamp related to contract state or deployment.

_constructorFlag

bool

No

Flag indicating whether constructor has been called.

_code

map(uint8,cell)

No

Mapping of contract code versions keyed by an identifier.

_timeUnlock

uint32

No

Unlock time parameter from constructor.

_license_number

uint256

No

Counter for standard licenses issued.

_license_number_bm

uint256

No

Counter for BM licenses issued.

_rootElection

address

No

Address of the root election contract or manager.

_rootBM

address

No

Address of the root BM contract or manager.

_licenseLeft

uint128

No

Possibly number of licenses left or remaining quota.

_licenseBMLeft

uint128

No

Possibly number of BM licenses left or remaining quota.


Implementation Details and Algorithms


Interactions with Other Parts of the System


Mermaid Diagram: LicenseRoot Contract Structure

classDiagram
class LicenseRoot {
+uint256 _pubkey
+uint64 _timestamp
+bool _constructorFlag
+map(uint8, cell) _code
+uint32 _timeUnlock
+uint256 _license_number
+uint256 _license_number_bm
+address _rootElection
+address _rootBM
+uint128 _licenseLeft
+uint128 _licenseBMLeft
+constructor(timeUnlock, license_number, license_number_bm, rootElection, rootBM)
+deployLicense(pubkey)
+deployLicenseOwner(pubkey, isPrivileged)
+deployLicenseBM(pubkey)
+deployLicenseBMOwner(pubkey)
+setNewCode(id, code)
+getLastLicenseNum() uint256 num, uint256 numbm
+getLicenseAddress(num) address
+getLicenseBMAddress(num) address
+getVersion() string value0, string value1
}

This class diagram illustrates the internal state fields and publicly accessible functions of the LicenseRoot contract, reflecting its role as a factory and manager for license-related entities.