SignerIndex.abi.json

Overview

This file defines the Application Binary Interface (ABI) for the SignerIndex smart contract, version 2.4, using ABI version 2. The contract manages signer indices related to blockchain validators or nodes. It includes functions for initializing the contract, validating signer acceptance criteria, continuing acceptance checks, querying readiness status, and retrieving version information. The contract maintains several internal fields representing keys, timestamps, state flags, and addresses relevant to signer management.

The ABI describes the contract interface, including function signatures, input/output parameters, and persistent storage fields, providing a blueprint for interaction with the contract on the blockchain.


ABI Structure and Components

Header

Fields

The contract maintains the following fields, some initialized at deployment (init: true), others updated during the contract lifecycle:

Field Name

Type

Initialized

Description

_pubkey

uint256

Yes

Public key associated with signer index.

_timestamp

uint64

No

Last updated timestamp.

_constructorFlag

bool

No

Flag indicating if constructor logic was executed.

_signerIndex

uint16

Yes

Numeric index of the signer.

_root

address

Yes

Address of the root contract or controller.

_wallet

address

No

Wallet address linked to signer.

_ready

bool

No

Readiness status of the signer index.


Functions

constructor

{
  "name": "constructor",
  "inputs": [{"name":"wallet","type":"address"}],
  "outputs": []
}

isSignerIndexAccept

{
  "name": "isSignerIndexAccept",
  "inputs": [
    {"name":"wallet","type":"address"},
    {"name":"blsKey","type":"bytes"},
    {"name":"pubkey","type":"uint256"},
    {"name":"rep_coef","type":"uint128"},
    {"name":"stake","type":"uint128"},
    {"name":"virtualStake","type":"optional(uint128)"},
    {"name":"ProxyList","type":"map(uint8,string)"},
    {"name":"myIp","type":"string"},
    {"name":"nodeVersion","type":"optional(string)"}
  ],
  "outputs": []
}

isSignerIndexAcceptContinue

{
  "name": "isSignerIndexAcceptContinue",
  "inputs": [
    {"name":"wallet","type":"address"},
    {"name":"blsKey","type":"bytes"},
    {"name":"pubkey","type":"uint256"},
    {"name":"seqNoStartOld","type":"uint64"},
    {"name":"stake","type":"uint128"},
    {"name":"virtualStake","type":"optional(uint128)"},
    {"name":"ProxyList","type":"map(uint8,string)"},
    {"name":"sumReputationCoef","type":"uint128"},
    {"name":"nodeVersion","type":"optional(string)"}
  ],
  "outputs": []
}

destroy

{
  "name": "destroy",
  "inputs": [],
  "outputs": []
}

getReadyStatus

{
  "name": "getReadyStatus",
  "inputs": [],
  "outputs": [{"name":"ready","type":"bool"}]
}

getVersion

{
  "name": "getVersion",
  "inputs": [],
  "outputs": [
    {"name":"value0","type":"string"},
    {"name":"value1","type":"string"}
  ]
}

Important Implementation Details


Interactions with Other System Components


Visual Diagram

flowchart TD
A["constructor(wallet)"] --> B["isSignerIndexAccept(...)"]
B --> C["isSignerIndexAcceptContinue(...)"]
C --> D["getReadyStatus()"]
D --> E["getVersion()"]
B --> F["destroy()"]
C --> F
style A fill:#f9f,stroke:#333,stroke-width:1px
style B fill:#bbf,stroke:#333,stroke-width:1px
style C fill:#bbf,stroke:#333,stroke-width:1px
style D fill:#bfb,stroke:#333,stroke-width:1px
style E fill:#bfb,stroke:#333,stroke-width:1px
style F fill:#f88,stroke:#333,stroke-width:1px

The diagram illustrates the main functions and their typical call relationships within the contract lifecycle: starting with the constructor, proceeding through acceptance checks, querying status and version, and optionally destruction.