Module-level declarations

Types

Link copied to clipboard

Staking settings.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
entity cluster
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Economy metrics for a node

Link copied to clipboard
struct evm_bridge
Link copied to clipboard
entity lease
Link copied to clipboard
Link copied to clipboard
struct lease_data
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Keep tracks of the amount minted for the configured period of time.

Link copied to clipboard
Link copied to clipboard
enum network
Link copied to clipboard
Link copied to clipboard
entity node
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Keeps shared rewards to be payed out at next staking reward payout

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
entity provider
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Tracks staking on EVM until a FT4 account is created

Link copied to clipboard
Link copied to clipboard

Keep deleted nodes pubkey until next reward is calculated to be able to merge availability reports

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Represents a withdrawal request from user for the total staked amount.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
object state
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
entity tag
Link copied to clipboard
struct tag_data
Link copied to clipboard
entity ticket
Link copied to clipboard
Link copied to clipboard

Please do not change this file without reading the README.

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
val DAY_MS: integer = 86400000
Link copied to clipboard
val deposit_account_type: text = "DEPOSIT"
Link copied to clipboard
val foundation_account_type: text = "FOUNDATION"
Link copied to clipboard
val invalid_entity_message: text = "Entity name can only contain letters, numerals, underscores and start with either a letter or numeral. Maximum allowed length is 64 characters."
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val pool_account_type: text = "REWARD_POOL"
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val system_cluster_name: text = "system"
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
function __handle_staking_events(network_id: integer, events: list<event_data>)
Link copied to clipboard
function __staking_begin_block(height: integer)
Link copied to clipboard
function __staking_init()
Link copied to clipboard
function _change_staking_account(account: account, new_account: account)
Link copied to clipboard
Link copied to clipboard
function _fn_evm_block(network_id: integer, evm_block_height: integer, evm_block_hash: byte_array, events: list<event_data>)
Link copied to clipboard
Link copied to clipboard
function _staking_delegate(staker: account, provider_pubkey: byte_array, _network: network?)
Link copied to clipboard
function _staking_deposit_native_impl(amount: integer, delegate_to: byte_array?)
Link copied to clipboard
function _staking_distribute_rewards(using_batches: boolean, update_pending_token_times: boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function _staking_pay_reward(last_known_time: integer, pool: account, asset: asset, account: account, amount: integer, shared_amount: integer, providers: list<byte_array>)
Link copied to clipboard
function _staking_request_withdrawal(user: account, _network: network)
Link copied to clipboard
function _staking_shared_rewards(pay_reward_result: pay_reward_result, delegation_share: decimal)
Link copied to clipboard
function _staking_update_evm_state(staker: account, network: network, new_balance: integer)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function adjusted_availability_factor(availability_factor: decimal): decimal
Link copied to clipboard
@extendable function after_pay_reward(pay_reward_result: pay_reward_result, delegation_share: decimal)
Link copied to clipboard
@extendable function after_ras_staking(account: account)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function apply_stake_action(account: account, strategy_params_gtv: gtv)
Link copied to clipboard
function apply_tag_create(proposal: common_proposal)
Link copied to clipboard
function apply_tag_remove(proposal: common_proposal)
Link copied to clipboard
function apply_tag_update(proposal: common_proposal)
Link copied to clipboard
@extend(on_begin_block) function begin_block(height: integer)
Link copied to clipboard
function bridge_lease_funds_check(bridge_lease: bridge_lease)
Link copied to clipboard
function calculate_container_cost(duration_weeks: integer, container_units: integer, extra_storage_gib: integer, tag: tag, extra_compute_requests: integer): integer
Link copied to clipboard
function calculate_dapp_cluster_rewards(cluster: cluster, node_availability_report: node_availability_report): map<node, big_integer>
Link copied to clipboard

Convert the EVM transaction cost into CHR.

Link copied to clipboard
Link copied to clipboard
function calculate_remaining_lease_value(lease: lease, current_time: integer): integer
Link copied to clipboard
function calculate_storage_mib(container_units: integer, extra_storage_gib: integer): integer
Link copied to clipboard
function calculate_system_cluster_rewards(system_cluster: cluster, node_availability_report: node_availability_report): map<node, big_integer>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function convert_token_rate(amount: big_integer, from_symbol: text, from_units: big_integer, to_symbol: text, to_units: big_integer): big_integer?
Link copied to clipboard
Link copied to clipboard
function create_container_impl(provider_pubkey: byte_array, container_units: integer, duration_weeks: integer, extra_storage_gib: integer, cluster_name: text, auto_renew: boolean, subnode_image_name: text, extra_compute_requests: integer)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function create_reward_provider_deleted_node(provider: provider, node: byte_array, clusters: list<cluster>)
Link copied to clipboard
function create_system_p_proposal(common_proposal_type: common_proposal_type, provider: provider, description: text): common_proposal
Link copied to clipboard
function dapp_cluster_value(cluster: cluster): decimal
Link copied to clipboard
Link copied to clipboard
function deduct_tx_cost_from_dapp_user(evm_transaction_submitter_cost: evm_transaction_submitter_cost, tx_cost: big_integer)
Link copied to clipboard
function delete_expired_leases(current_time_millis: integer)
Link copied to clipboard
Link copied to clipboard
function disable_bridge_lease(bridge_lease: bridge_lease)
Link copied to clipboard
function do_migrations()
Link copied to clipboard
@extend(on_lease_expired) function expire_bridge_leases(lease: lease)
Link copied to clipboard
function expire_lease(lease: lease)
Link copied to clipboard
function expire_leases(current_time_millis: integer)
Link copied to clipboard
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(after_evm_account_linked) function (address: byte_array, account: account, network_id: integer, is_contract: boolean)
Link copied to clipboard
@extend(remove_provider_handler) function (provider: provider)
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(after_pay_reward) function (pay_reward_result: pay_reward_result, delegation_share: decimal)
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(strategy) function (): map<text, _strategy>
Link copied to clipboard
@extend(on_scheduled_callback_map) function (): map<integer, (integer) -> unit>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(before_transfer) function (from: account, to: account, asset: asset, amount: big_integer)
Link copied to clipboard
@extend(before_apply_transfer) function (sender_blockchain_rid: byte_array, sender_account_id: byte_array, recipient_id: byte_array, asset: asset, amount: big_integer, hop_index: integer, is_final: boolean)
Link copied to clipboard
@extend(handle_evm_block) function (evm_block: evm_block_message)
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
@extend(auth_handler) function (): map<text, _auth_handler>
Link copied to clipboard
Link copied to clipboard
function get_aggregated_node_availability(node_availability_report: map<byte_array, decimal>, node: node, cluster: cluster): decimal

Get the nodes availability and include deleted nodes availability in case the node was replaced since last reward

Link copied to clipboard
function get_asset(): asset
Link copied to clipboard
function get_boolean(value: integer?): boolean
Link copied to clipboard
function get_boolean_int(value: boolean?): integer
Link copied to clipboard
function get_days_since(time: integer): integer
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function get_most_container_space_usage_mib(container_name: text): integer?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function get_provider_node_type_count(provider: provider): (system: integer, dapp: integer)
Link copied to clipboard
Link copied to clipboard
function get_staking_requirements(provider: provider): (own: integer, total: integer)
Link copied to clipboard

Return a sum of the total number of SCUs available in all nodes dapp clusters, excluding the units allocated by system.

Link copied to clipboard
function handle_icmf_message(sender: byte_array, topic: text, body: gtv)
Link copied to clipboard
function handle_price_oracle_update(symbol: text, name: text, price: decimal, tvl: decimal)
Link copied to clipboard
Link copied to clipboard
function has_pending_upgrade(container_name: text): boolean
Link copied to clipboard
@extend(receive_icmf_message) function icmf_message_receive(sender: byte_array, topic: text, body: gtv)
Link copied to clipboard
function is_anchoring_data_up_to_date(container_name: text): boolean
Link copied to clipboard
function is_staking_approved(provider: provider, reward: big_integer): boolean
Link copied to clipboard
function maybe_expire_lease(lease: lease)
Link copied to clipboard
function occupancy_rate(cluster: cluster): decimal
Link copied to clipboard
function occupied_scus(cluster: cluster): integer
Link copied to clipboard
@extendable function on_expired_lease_removed(lease: lease)
Link copied to clipboard
@extendable function on_lease_expired(lease: lease)
Link copied to clipboard
@extendable function on_lease_resurrected(lease: lease)
Link copied to clipboard
function pay_evm_transaction_submitter_rewards(evm_transaction_submitter_cost: evm_transaction_submitter_cost, reward: big_integer)
Link copied to clipboard
function pay_out_node_rewards(node_reward: map<node, big_integer>, has_delegation_share: boolean)
Link copied to clipboard
function pay_reward(pool: account, account: account, reward_debt: big_integer, reward: big_integer, identity: text, delegation_share: decimal): pay_reward_result
Link copied to clipboard
function pay_rewards(cluster: cluster, node_availability_report: node_availability_report)
Link copied to clipboard
function price_oracle_updates_begin_block(current_time_millis: integer)
Link copied to clipboard
function publish_staking_state(staker: account)
Link copied to clipboard
Link copied to clipboard
function receive_blockchain_rid(body: gtv)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function receive_price_oracle_update(sender: byte_array, body: gtv)
Link copied to clipboard
Link copied to clipboard
function refund_lease(lease: lease)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@extendable function remove_provider_handler(provider: provider)
Link copied to clipboard
Link copied to clipboard
function renew_container_lease(account: account, lease: lease, duration_weeks: integer)
Link copied to clipboard
Link copied to clipboard
function require_blockchain_rid(blockchain_rid: byte_array)
Link copied to clipboard
function require_cluster(name: text): cluster
Link copied to clipboard
function require_dapp_cluster(cluster_name: text)
Link copied to clipboard
Link copied to clipboard
function require_enough_space(container_name: text, current_total_storage_mib: integer, upgraded_total_storage_mib: integer)
Link copied to clipboard
Link copied to clipboard

Return the system provider entity if found by provider_pubkey.

Link copied to clipboard
function require_lease(container_name: text): lease
Link copied to clipboard
function require_lease_duration(duration_weeks: integer)
Link copied to clipboard
function require_node(pubkey: byte_array): node
Link copied to clipboard
Link copied to clipboard
function require_proposal_value_ge_0(value: decimal, name: text)
Link copied to clipboard
function require_proposal_value_ge_1(value: decimal, name: text)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function require_pubkey(pubkey: byte_array)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function require_tag(name: text): tag
Link copied to clipboard
function require_valid_ec_total_share(system_provider_fee_share: decimal, staking_reward_fee_share: decimal, chromia_foundation_fee_share: decimal, resource_pool_margin_fee_share: decimal, system_provider_risk_share: decimal, dapp_provider_risk_share: decimal)
Link copied to clipboard
Link copied to clipboard
function restart_container(container_name: text)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function save_node_payed_reward(node: byte_array, value: big_integer, time: integer)
Link copied to clipboard
Link copied to clipboard
function send_bridge_lease_message(bridge_lease: bridge_lease, deleted: boolean)
Link copied to clipboard
Link copied to clipboard
function set_token_rate(symbol: text, name: text, price: decimal)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function total_available_scus(cluster_units: integer): integer
Link copied to clipboard
Link copied to clipboard
function transfer_reward(pool: account, account: account, amount: big_integer): boolean
Link copied to clipboard
Link copied to clipboard
function try_transfer_reward(pool: account, account: account, amount: big_integer)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function upsert_price_oracle_rate_entity(name: text, symbol: text, price: decimal)
Link copied to clipboard
Link copied to clipboard
function validate_entity_name(name: text)
Link copied to clipboard
function validate_provider(new_provider: byte_array)
Link copied to clipboard
function validate_tag_proposal(proposal_details: pending_tag_operation)

Queries

Link copied to clipboard
Link copied to clipboard
query create_container_cost(container_units: integer, duration_weeks: integer, extra_storage_gib: integer, cluster_name: text, subnode_image_name: text, extra_compute_requests: integer): integer

Calculate the cost to lease a container.

Link copied to clipboard

Check if an FT4 account requires memo when transferring assets to it.

Link copied to clipboard
query get_accounts_with_native_stake(page_size: integer, page_cursor: text?): paged_result

List of all accounts that has a native stake

Link copied to clipboard

Return all bridge leases for blockchain.

Link copied to clipboard

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.

Link copied to clipboard

Get all subnode images which are available for a specific cluster (common and special for this cluster).

Link copied to clipboard
query get_balance(account_id: byte_array): big_integer

Get balance of the account.

Return all blockchains with bridge and anomaly detector info.

Link copied to clipboard

Return bridge lease for blockchain.

Link copied to clipboard
query get_chr_asset(): (id: byte_array, name: text, symbol: text, decimals: integer, blockchain_rid: byte_array, icon_url: text, type: text, supply: big_integer)

Get information about the CHR asset.

Link copied to clipboard
query get_chromia_foundation_voter_set_info(): (name: text, threshold: integer, governor: text, members: list<byte_array>)
Link copied to clipboard

Returns information for a specified cluster, including any active special subnode images supported by the cluster.

Link copied to clipboard

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.

Link copied to clipboard

Returns information for clusters, including any active special subnode images supported by the cluster.

Link copied to clipboard

Returns ticket information for the create container ticket by ticket ID.

Returns ticket information for the create container ticket by transaction RID.

Link copied to clipboard

Get economy constants.

Link copied to clipboard

Return economy metrics.

Link copied to clipboard

Get economy details for a specific node.

Link copied to clipboard

Get economy metrics for all provider nodes.

Link copied to clipboard
Link copied to clipboard

Get current lease for a container.

Link copied to clipboard
query get_lease_purchases(page_size: integer?, page_cursor: text?): paged_result
Link copied to clipboard
query get_lease_purchases_by_account(account_id: byte_array, page_size: integer?, page_cursor: text?): paged_result
Link copied to clipboard
query get_lease_refunds(page_size: integer?, page_cursor: text?): paged_result
Link copied to clipboard
query get_lease_refunds_by_account(account_id: byte_array, page_size: integer?, page_cursor: text?): paged_result
Link copied to clipboard

Get leases for an account.

Link copied to clipboard

Get maximum lease time in weeks.

Link copied to clipboard

Get minimum lease time in weeks.

Link copied to clipboard

Get any pending staking rewards share update for a node provider, or null if there is none.

Link copied to clipboard

Returns all pending tickets (of any kind) for an account.

Link copied to clipboard

Returns current balance of reward pool.

Link copied to clipboard

Get provider account id.

Link copied to clipboard

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.

Link copied to clipboard

Get provider staking status.

Link copied to clipboard
Link copied to clipboard

Get a tag by name.

Link copied to clipboard
query get_tag_proposal(proposal_id: rowid): tag_data
Link copied to clipboard

Get a list of all tags.

Link copied to clipboard

Returns information for any ticket by ID.

Link copied to clipboard

Returns information for any ticket by transaction RID.

Link copied to clipboard
Link copied to clipboard

Returns ticket information for the upgrade container ticket by ticket ID.

Returns ticket information for the upgrade container ticket by transaction RID.

Link copied to clipboard
query renew_container_cost(container_name: text, duration_weeks: integer): integer

Calculate the cost to renew container lease.

Link copied to clipboard
query staking_get_all_rewards_paid(from: integer?, to: integer?): (staking_rewards: integer, shared_rewards: integer)

All staking and shared rewards that have been distributed to users (shared rewards included from 2024-10-26)

Link copied to clipboard

Balance staked by the user

Link copied to clipboard

Balance staked by the user on a specific network

Link copied to clipboard

Gets the user's most recent stake delegation across all network. This can vary if a withdrawal has been made on a single chain.

Link copied to clipboard

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.

Link copied to clipboard

Current annualised reward rate @return as a decimal fraction, eg. 0.1 is 10%

Link copied to clipboard

Native FT4 Chromia balance of CHR (in minor units) staked by the user

Link copied to clipboard

This will return the next delegation change, or null if there is none. Delegation changes do not take place immediately.

Link copied to clipboard

Number of users delegating to a provider

Link copied to clipboard

Returns the previous provider delegate for a given staker account, along with information about whether the un-delegation was automatic due to provider offboarding.

Link copied to clipboard

Total stake the provider has delegated to themselves

Link copied to clipboard

Staking rewards that have already been distributed to the user /*

Link copied to clipboard

Starting instant of rewards @return As a Unix timestamp

Link copied to clipboard
query staking_get_shared_rewards_paid(account_id: byte_array, provider_pubkey: byte_array?, since: integer?): integer

Shared staking rewards that have already been distributed to the user

Link copied to clipboard

Total staked CHR across all networks and all users that had been delegated to the provider

Link copied to clipboard
query staking_get_withdrawal_time(account_id: byte_array, network: network): integer?

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.

Link copied to clipboard

Get the current staking rewards share for a node provider, as a percentage between 0.0 and 1.0.

Link copied to clipboard

Reward that would be paid to the user if rewards were distributed now

Link copied to clipboard

All staking rewards earned for an account, including both distributed and undistributed rewards.

Link copied to clipboard

Total number of users that have created an account and staked on any network

Link copied to clipboard

Total number of users that have created an account and staked on a network

Link copied to clipboard

Total delegated by all users

Link copied to clipboard

Total users that have delegated

Link copied to clipboard

Total staked by all users with a Chromia account (including undelegated stakes)

Link copied to clipboard

Total staked by all users with a Chromia account on network (including undelegated stakes)

Link copied to clipboard
Link copied to clipboard
query upgrade_container_cost(container_name: text, upgraded_container_units: integer, upgraded_extra_storage_gib: integer, upgraded_cluster_name: text, upgraded_duration_weeks: integer, upgraded_extra_compute_requests: integer): integer

Calculate the cost to upgrade a container, might be negative.

Operations

Accept offered lease ownership transfer. ft4.ft_auth operation by container lease receiver account is required to accept transfer offer.

Link copied to clipboard
operation add_bridge_lease(container_name: text, blockchain_rid: byte_array, evm_network_id: integer, validator_contract: text, bridge_contract: text, anomaly_detection: boolean)
Link copied to clipboard
operation assign_subnode_image_to_container(container_name: text, subnode_image_name: text)

Request assign a custom subnode image to an existing container.

An ICMF message will be sent to DC for updating of the container.

Link copied to clipboard
operation auto_renew_container(container_name: text)

Turn on auto-renewal of lease for container.

Link copied to clipboard
operation cancel_renew_container(container_name: text)

Cancel auto-renewal of lease.

Link copied to clipboard
operation change_cluster_tag(my_pubkey: byte_array, cluster_name: text, tag_name: text)
Link copied to clipboard
operation create_cluster(my_pubkey: byte_array, name: text, governor_voter_set_name: text, voter_set_name: text, cluster_units: integer, extra_storage: integer, tag_name: text, container_unit_cpu: integer, container_unit_ram: integer, container_unit_io_read: integer, container_unit_io_write: integer, container_unit_storage: integer, system_container_units: integer)
Link copied to clipboard
operation create_container(provider_pubkey: byte_array, container_units: integer, duration_weeks: integer, extra_storage_gib: integer, cluster_name: text, auto_renew: boolean)

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.

Link copied to clipboard
operation create_container_with_subnode_image(provider_pubkey: byte_array, container_units: integer, duration_weeks: integer, extra_storage_gib: integer, cluster_name: text, auto_renew: boolean, subnode_image_name: text, extra_compute_requests: integer)

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.

Link copied to clipboard
operation create_tag(my_pubkey: byte_array, name: text, scu_price: integer, extra_storage_price: integer)
Link copied to clipboard

Disable transfer memos for this FT4 account.

Link copied to clipboard

Enable transfer memos for this FT4 account.

Link copied to clipboard
operation init()
Link copied to clipboard
operation memo(text: text)

Add a memo to an FT4 transfer.

Can only be used in a transaction with an ft4.transfer operation, and only when the recipient account has memo enabled.

Link copied to clipboard
operation offer_container_lease_ownership_transfer(container_name: text, receiver_account_id: byte_array)

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

Link copied to clipboard
operation propose_minting(my_pubkey: byte_array, amount: integer, account_id: byte_array)
Link copied to clipboard
operation propose_staking_requirement_constants(my_pubkey: byte_array, enabled: boolean?, stop_payout_days: integer?, system_node_own_stake_chr: integer?, system_node_total_stake_chr: integer?, dapp_node_own_stake_chr: integer?, dapp_node_total_stake_chr: integer?, scheduled_at: integer?)
operation propose_system_provider_economy_constants(my_pubkey: byte_array, total_cost_system_providers: integer?, system_provider_fee_share: decimal?, system_provider_risk_share: decimal?)
operation propose_transfer_chromia_foundation_funds(my_pubkey: byte_array, amount: integer, account_id: byte_array)
Link copied to clipboard
operation ras_staking(evm_address: byte_array, main: auth_descriptor, disposable: auth_descriptor?)
Link copied to clipboard
operation register_dapp_provider(container_name: text, new_provider: byte_array)

Register a new dapp provider, will be proposed to be added to the container deployer voter set. Must be called by container lease owner.

Link copied to clipboard

Register a new dapp provider for a fee.

Link copied to clipboard
operation remove_bridge_lease(blockchain_rid: byte_array, evm_network_id: integer)

Remove bridge lease.

Remove offer lease ownership transfer. ft4.ft_auth operation by current container lease owner is required to remove offer.

Link copied to clipboard
operation remove_tag(my_pubkey: byte_array, name: text)
Link copied to clipboard
operation renew_container(container_name: text, duration_weeks: integer)

Renew container lease.

Link copied to clipboard
Link copied to clipboard
operation set_provider_staking_account(my_pubkey: byte_array, new_account_pubkey: byte_array)

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.

Link copied to clipboard

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

Link copied to clipboard

Cancel any unaction withdrawal request. This cancellation does not affect delegation.

Link copied to clipboard
operation staking_delegate(pubkey: byte_array?)

Delegate the user's stake to a provider identified by public key.

Link copied to clipboard
operation staking_deposit_native(amount: integer, delegateTo: byte_array?)

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard
operation transfer_to_pool(amount: big_integer)

Transfer tokens to the common pool account.

Link copied to clipboard
operation update_bridge_lease(blockchain_rid: byte_array, evm_network_id: integer, updated_validator_contract: text?, updated_bridge_contract: text?, anomaly_detection: boolean?)

Update bridge lease.

Link copied to clipboard
operation update_chromia_foundation_voter_set(my_pubkey: byte_array, new_threshold: integer?, new_member: list<byte_array>, remove_member: list<byte_array>)
Link copied to clipboard
operation update_economy_constants(my_pubkey: byte_array, min_lease_time_weeks: integer?, max_lease_time_weeks: integer?, staking_reward_rate: decimal?, staking_reward_fee_share: decimal?, chromia_foundation_fee_share: decimal?, resource_pool_margin_fee_share: decimal?, dapp_provider_risk_share: decimal?, scheduled_at: integer?)
Link copied to clipboard
operation update_provider_staking_rewards_share(my_pubkey: byte_array, staking_rewards_share: decimal)

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.

Link copied to clipboard
operation update_tag(my_pubkey: byte_array, name: text, scu_price: integer?, extra_storage_price: integer?)
Link copied to clipboard
operation upgrade_container(container_name: text, upgraded_container_units: integer, upgraded_extra_storage_gib: integer, upgraded_cluster_name: text, upgraded_duration_weeks: integer, upgraded_extra_compute_requests: integer)

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).