Skip to main content

FT4 configuration values

This topic provides the key configuration options available for FT4 modules, providing descriptions, types, and default values for each parameter.

note

You only need to configure the modules that you import in your dapp. If a module is not imported, its configuration is not required.

How to configure FT4 properties

You can configure these properties in your chromia.yml file under the moduleArgs section of each blockchain:

blockchains:
<blockchain>:
module: main
moduleArgs:
lib.ft4.core.admin:
admin_pubkey: "03028A31DBA82E46DE26A608249147A6A1A88C62A1A65B640C9B4369D4CAD928BE"
lib.ft4.core.accounts:
rate_limit:
active: true
max_points: 20
recovery_time: 5000
points_at_account_creation: 1

Admin module configuration

The admin module provides administrative operations for development and chain initialization.

warning

The admin module should not be present in production dapps as it provides administrative access that could compromise security.

info

For more information about the admin module and its operations, refer to the FT4 imports documentation.

NameDescriptionTypeRequiredDefault
admin_pubkeyPublic key of the admin user authorized to call admin operations. Must be generated using chr keygen.string

Example configuration

blockchains:
<blockchain>:
module: main
moduleArgs:
lib.ft4.core.admin:
admin_pubkey: "03028A31DBA82E46DE26A608249147A6A1A88C62A1A65B640C9B4369D4CAD928BE"

Accounts module configuration

The accounts module handles account management, authentication descriptors, and rate limiting.

info

For detailed information about account management and auth descriptors, refer to the account management documentation.

Rate limiting configuration (under the key rate_limit)

NameDescriptionTypeDefault
activeEnables or disables rate limiting globally.booleantrue
max_pointsMaximum number of operation points that can accumulate (maximum transactions that can be done at once).int10
recovery_timeTime in milliseconds for points to recover (cooling period before an account can receive one operation point).int5000
points_at_account_creationPoints that an account has at the moment of its creation (0 is minimum).int1

Auth descriptor configuration (under the key auth_descriptor)

NameDescriptionTypeDefault
max_number_per_accountMaximum number of auth descriptors an account can have.int10

Auth descriptor rules configuration (under the key max_auth_descriptor_rules)

NameDescriptionTypeDefault
max_auth_descriptor_rulesMaximum number of rules that can be configured in an auth descriptor.int8

Example configuration

blockchains:
<blockchain>:
module: main
moduleArgs:
lib.ft4.core.accounts:
rate_limit:
active: true
max_points: 20
recovery_time: 5000
points_at_account_creation: 1
auth_descriptor:
max_number_per_account: 4
max_auth_descriptor_rules: 4
info

For additional FT4 configuration, refer to the following documentation:

Transfer Strategy Configuration:

Cross-chain Configuration:

Special Configuration Values:

Library dependencies

FT4 requires specific library dependencies to be configured in the libs section.

NameDescriptionTypeRequiredDefault
ft4FT4 library configuration with registry, path, tag/branch, and RID.object
iccfICCF library for cross-chain functionality (recommended even if not using cross-chain).object

Library configuration properties

Each library object contains the following properties:

NameDescriptionTypeRequiredDefault
registryGit registry URL for the library.string
pathPath within the repository to the library.string
tagOrBranchGit tag or branch to use for the library.string
ridRepository ID for the library.byte_array
insecureWhether to use insecure connections (not recommended for production).booleanfalse
info

For detailed library configuration examples, refer to the FT4 setup documentation which provides complete configuration examples.

Complete configuration example

Here's a complete example showing the core FT4 module configuration options:

blockchains:
<blockchain>:
module: main
moduleArgs:
lib.ft4.core.admin:
admin_pubkey: "03028A31DBA82E46DE26A608249147A6A1A88C62A1A65B640C9B4369D4CAD928BE"
lib.ft4.core.accounts:
rate_limit:
active: true
max_points: 20
recovery_time: 5000
points_at_account_creation: 1
auth_descriptor:
max_number_per_account: 4
max_auth_descriptor_rules: 4
tip

For complete configuration examples including library dependencies and transfer strategies, refer to: