sway_types/
constants.rs

1//! Configurable yet non-changing constants for the compiler.
2
3/// The default extension of [LANGUAGE_NAME] files, e.g. `main.sw`.
4pub const DEFAULT_FILE_EXTENSION: &str = "sw";
5/// After a large language name change PR, we decided to make this configurable. :)
6pub const LANGUAGE_NAME: &str = "Sway";
7/// The size, in bytes, of a single word in the FuelVM.
8pub const VM_WORD_SIZE: u64 = 8;
9
10pub const CONTRACT_CALL_GAS_PARAMETER_NAME: &str = "gas";
11
12pub const CONTRACT_CALL_COINS_PARAMETER_NAME: &str = "coins";
13pub const CONTRACT_CALL_COINS_PARAMETER_DEFAULT_VALUE: u64 = 0;
14
15pub const CONTRACT_CALL_ASSET_ID_PARAMETER_NAME: &str = "asset_id";
16pub const CONTRACT_CALL_ASSET_ID_PARAMETER_DEFAULT_VALUE: [u8; 32] = [0; 32];
17
18/// The default entry point for scripts and predicates.
19pub const DEFAULT_ENTRY_POINT_FN_NAME: &str = "main";
20
21pub const STD: &str = "std";
22pub const PRELUDE: &str = "prelude";
23pub const CONTRACT_ID: &str = "CONTRACT_ID";