Module-level declarations

Types

Link copied to clipboard

The configuration for this module, to be defined in the chromia.yml

Properties

Link copied to clipboard
val MODULE_NAME: text = "lib.ft4.core.accounts.strategy.transfer.fee"

the name of this module, for more readable errors

Functions

Link copied to clipboard

Calculates the account details for the account that will be registered using the ft4.ras_transfer_fee strategy.

Link copied to clipboard

Returns the ID of the account that receives the fee payments, or null for the default one

To get the account, the proper usage is:

val account = transfer.ensure_chain_fee_account(fee_account_id());
Link copied to clipboard

Returns the assets configured in module_args.asset.

Link copied to clipboard
@extend(strategy) function (): map<text, _strategy>
Link copied to clipboard
function transfer_action(account: account, strategy_params_gtv: gtv)

The action for the fee _strategy. Transfers the funds to the account, paying the fee that is required.

Throws "FORBIDDEN ASSET" if the asset:

  • cannot be used to pay the fee, or

  • is not found.

Throws if the chain configuration cannot be parsed.

Queries

Link copied to clipboard
@mount("ft4.get_fee_assets") query get_fee_assets(): list<(asset_id: byte_array, amount: big_integer)>

Returns a list of assets that can be used to pay for the registration fee, alongside the amount to be paid.

Operations

Link copied to clipboard
@mount("ft4.ras_transfer_fee") operation ras_transfer_fee(asset_id: byte_array, main: auth_descriptor, disposable: auth_descriptor?)

The operation that defines this strategy. The fee strategy allows users to register a new account by paying a one-time fee.

Throws if the next operation in the transaction is not accepted by require_register_account_next_operation