LicenseBM.abi.json

Overview

This file defines the Application Binary Interface (ABI) for the LicenseBM smart contract. The ABI specifies the contract's interface for interaction, including its functions, fields (storage variables), and initialization parameters. The contract manages licenses linked to Blockchain Manager (BM) wallets, enabling ownership control, license acceptance or rejection, and token withdrawal operations. It maintains a relationship between license holders and BM wallets, providing mechanisms to update owner credentials and manage wallet associations.

ABI Version and Metadata

Fields (Storage Variables)

Field Name

Type

Initial Value

Description

_pubkey

uint256

Yes

Public key of the contract owner, initialized during deployment.

_timestamp

uint64

No

Timestamp of the last relevant contract action or update.

_constructorFlag

bool

No

Flag indicating if the constructor logic has been executed.

_license_number

uint256

Yes

Unique identifier for the license managed by this contract instance.

_root

address

Yes

Root address associated with the license or contract deployment.

_owner_pubkey

optional(uint256)

No

Public key of the current owner; optional since owner can be address-based.

_owner_address

optional(address)

No

Address of the current owner; optional to allow public key ownership.

_rootBM

address

No

Address of the root BM wallet associated with this license.

_bmwallet

optional(address)

No

Address of the BM wallet currently linked to this license.

_rewarded

uint128

No

Amount of tokens rewarded to the license or wallet.

_slashSum

uint128

No

Amount of tokens slashed or penalized.

_licenseLastTouch

uint64

No

Timestamp of the last license update or interaction.

_code

map(uint8,cell)

No

Mapping of code cells indexed by integer keys, possibly for upgradeable logic or modular code.


Functions

constructor(pubkey: uint256, walletCode: cell, rootBM: address)


setOwnerAddress(owner: address)


setOwnerPubkey(pubkey: uint256)


removeBMWallet()


deleteWallet(reward: uint128, slashSum: uint128)


addBMWallet(pubkey: uint256)


withdrawToken(to: address, value: uint128)


notAcceptLicense(pubkey: uint256)


acceptLicense(pubkey: uint256)


toWithdrawToken(to: address, value: uint128)


getDetails()


getBM()


getOwner()


getVersion()


Implementation Details and Algorithms


Interactions with Other System Components


Visual Diagram: LicenseBM Contract Structure

classDiagram
class LicenseBM {
+constructor()
+setOwnerAddress()
+setOwnerPubkey()
+removeBMWallet()
+deleteWallet()
+addBMWallet()
+withdrawToken()
+notAcceptLicense()
+acceptLicense()
+toWithdrawToken()
+getDetails()
+getBM()
+getOwner()
+getVersion()
_pubkey: uint256
_timestamp: uint64
_constructorFlag: bool
_license_number: uint256
_root: address
_owner_pubkey: optional(uint256)
_owner_address: optional(address)
_rootBM: address
_bmwallet: optional(address)
_rewarded: uint128
_slashSum: uint128
_licenseLastTouch: uint64
_code: map(uint8,cell)
}

This diagram shows the contract's functions and its primary storage fields, illustrating the encapsulated license and wallet management functionality.