Module-level declarations
Types
Staking settings.
Economy metrics for a node
Keep tracks of the amount minted for the configured period of time.
Keeps shared rewards to be payed out at next staking reward payout
Provider account to be used for staking only. It will by default point to the provider_account but can be changed to a different account when needed.
Tracks staking on EVM until a FT4 account is created
Keep deleted nodes pubkey until next reward is calculated to be able to merge availability reports
Represents a withdrawal request from user for the total staked amount.
Please do not change this file without reading the README.
Properties
Functions
Convert the EVM transaction cost into CHR.
Get the nodes availability and include deleted nodes availability in case the node was replaced since last reward
Return a sum of the total number of SCUs available in all nodes dapp clusters, excluding the units allocated by system.
Return the system provider entity if found by provider_pubkey.
Queries
Check if an FT4 account requires memo when transferring assets to it.
List of all accounts that has a native stake
Return all bridge leases for blockchain.
Return all bridge leases for container.
Returns ticket information for assigning subnode image to container ticket by ticket ID.
Returns ticket information for assigning subnode image to container ticket by transaction RID.
Get all common subnode images which are available for all clusters.
Get all subnode images which are available for a specific cluster (common and special for this cluster).
Get balance of the account.
Return all blockchains with bridge and anomaly detector info.
Return bridge lease for blockchain.
Get information about the CHR asset.
Returns information for a specified cluster, including any active special subnode images supported by the cluster.
See if the cluster was created successfully, is still pending, or failed to be created. If the cluster does not exist, the creation status will be unknown.
Returns information for clusters, including any active special subnode images supported by the cluster.
Returns ticket information for the create container ticket by ticket ID.
Returns ticket information for the create container ticket by transaction RID.
Get economy constants.
Return economy metrics.
Get economy details for a specific node.
Get economy metrics for all provider nodes.
Get current lease for a container.
Get leases for an account.
Get maximum lease time in weeks.
Get minimum lease time in weeks.
Get any pending staking rewards share update for a node provider, or null if there is none.
Returns all pending tickets (of any kind) for an account.
Returns current balance of reward pool.
Get provider account id.
Return provider performance metrics.
Return provider performance metrics over the last 30 days.
Return provider performance metrics over the last 365 days.
Return provider performance metrics over the last 7 days.
Get provider staking status.
Get a tag by name.
Returns information for any ticket by ID.
Returns information for any ticket by transaction RID.
Returns ticket information for the upgrade container ticket by ticket ID.
Returns ticket information for the upgrade container ticket by transaction RID.
Calculate the cost to renew container lease.
All staking and shared rewards that have been distributed to users (shared rewards included from 2024-10-26)
Balance staked by the user
Balance staked by the user on a specific network
Gets the user's most recent stake delegation across all network. This can vary if a withdrawal has been made on a single chain.
The current delegation of the user's stake on one of the three blockchain networks. Ordinarily the user would be staked (or unstaked) identitically across all networks.
Current annualised reward rate @return as a decimal fraction, eg. 0.1 is 10%
Native FT4 Chromia balance of CHR (in minor units) staked by the user
This will return the next delegation change, or null if there is none. Delegation changes do not take place immediately.
Number of users delegating to a provider
Returns the previous provider delegate for a given staker account, along with information about whether the un-delegation was automatic due to provider offboarding.
Total stake the provider has delegated to themselves
Staking rewards that have already been distributed to the user /*
Starting instant of rewards @return As a Unix timestamp
Shared staking rewards that have already been distributed to the user
Total staked CHR across all networks and all users that had been delegated to the provider
Timestamp of the next withdrawal.
The true expected time will be slightly longer than this as withdrawal payouts trigger periodically. However the delay on a withdrawal payout should not be noticeable in a production configuration.
Get the current staking rewards share for a node provider, as a percentage between 0.0 and 1.0.
Reward that would be paid to the user if rewards were distributed now
All staking rewards earned for an account, including both distributed and undistributed rewards.
Total number of users that have created an account and staked on any network
Total number of users that have created an account and staked on a network
Total delegated by all users
Total users that have delegated
Total staked by all users with a Chromia account (including undelegated stakes)
Total staked by all users with a Chromia account on network (including undelegated stakes)
Operations
Accept offered lease ownership transfer. ft4.ft_auth operation by container lease receiver account is required to accept transfer offer.
Request assign a custom subnode image to an existing container.
An ICMF message will be sent to DC for updating of the container.
Turn on auto-renewal of lease for container.
Cancel auto-renewal of lease.
Request creation of a container with standard subnode image.
If enough tokens are available on the users account an ICMF message will be sent to DC for creation of the container. A lease is setup for the request amount of weeks and the cost is deducted from the users account.
Request creation of a container with custom subnode image.
If enough tokens are available on the users account an ICMF message will be sent to DC for creation of the container. A lease is setup for the request amount of weeks and the cost is deducted from the users account.
Disable transfer memos for this FT4 account.
Enable transfer memos for this FT4 account.
Offer container lease ownership transfer to a receiver FT4 account. ft4.ft_auth operation by current container lease owner is required to offer lease ownership transfer. Receiver FT4 account needs to accept the transfer by using the operation accept_container_lease_ownership_transfer
Register a new dapp provider, will be proposed to be added to the container deployer voter set. Must be called by container lease owner.
Register a new dapp provider for a fee.
Remove bridge lease.
Remove offer lease ownership transfer. ft4.ft_auth operation by current container lease owner is required to remove offer.
Renew container lease.
Set an alternative (optional account) for a staking provider.
The alternative account will be used for the provider's stake and reward pay-outs.
This transaction must be signed with the provider's main key, but is not FT4 authenticated.
Set an alternative (optional account) for a staking provider.
The alternative account will be used for the provider's stake and reward pay-outs.
This transaction must be signed with the provider's main key, be FT4 authenticated with the account the provider wishes to use
Cancel any unaction withdrawal request. This cancellation does not affect delegation.
Delegate the user's stake to a provider identified by public key.
Draws FT4 CHR tokens from the user's account on the Economy Chain into the staking deposit account controlled by the staking logic. It can only be withdrawn later after a delay.
Called by a trusted staking oracle to tell us when a withdrawal request has been made on an EVM chain.
Performs the same logic as a native withdrawal request.
Requests the return of any of the user's FT4 CHR tokens from the staking account to their account. This will happen automatically after the withdrawal delay time. No staking reward will be earned waiting for a withdrawal.
Transfer tokens to the common pool account.
Update bridge lease.
Set the staking rewards share for a node provider.
This transaction must be signed with the provider's main key, but is not FT4 authenticated.
If possible upgrade (or downgrade) the container to requested specifications.
warning:
Please note that reducing the storage only works as long as the container still has at least 20% of free space (or what is configured in container_reduce_space_margin_requirement
).