ZCN S.C.
ZCN Smart Contract Functions
NewZCNSmartContract
Creates a new instance of the ZCN Smart Contract.
InitSC
Initializes smart contract functions within the ZCN Smart Contract, associating each function with a key.
Key Functions
Configuration
update-global-config
: Updates the global configuration of the smart contract.update-authorizer-config
: Configures specific authorizers for the smart contract.
Bridge-Related
mint
: Mints new ZCN tokens.burn
: Burns ZCN tokens, typically used for cross-chain interactions.
Authorizer Management
add-authorizer
: Adds a new authorizer.delete-authorizer
: Removes an existing authorizer.authorizer-health-check
: Conducts a health check on an authorizer.
Delegate Pools
add-to-delegate-pool
: Adds tokens to the delegate pool for staking.delete-from-delegate-pool
: Removes tokens from the delegate pool.update-authorizer-stake-pool
: Updates the stake pool for an authorizer.
Execution Statistics
ZCN Smart Contract records metrics for each major function to track performance:
Core Functions
Execute
Executes a specified function within the ZCN Smart Contract based on the provided method name and input data.
Function Signature:
Parameters:
Returns:
string
- Result of the function execution.error
- Error if the execution fails.
Cost Table Retrieval
GetCostTable
Retrieves the cost table for the smart contract, containing configuration costs associated with each operation.
Function Signature:
Parameters:
Returns:
map[string]int
- A map containing the cost configuration for each function.error
- Error if retrieval fails.
Last updated