Skip to content

1.8. Keywords#

Syntax#


(* Introduced in 0.6.0 *)
ABSTRACT_KEYWORD = "abstract";

ADDRESS_KEYWORD = "address";

AFTER_KEYWORD = "after";

(* Reserved in 0.5.0 *)
ALIAS_KEYWORD = "alias";

ANONYMOUS_KEYWORD = "anonymous";

(* Reserved in 0.5.0 *)
APPLY_KEYWORD = "apply";

AS_KEYWORD = "as";

ASSEMBLY_KEYWORD = "assembly";

(* Reserved in 0.5.0 *)
AUTO_KEYWORD = "auto";

BOOL_KEYWORD = "bool";

BREAK_KEYWORD = "break";

(* Deprecated in 0.8.0 *)
BYTE_KEYWORD = "byte";

BYTES_KEYWORD = "bytes" ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32")?;

(* Introduced in 0.5.0 *)
(* Reserved in 0.5.0 *)
CALL_DATA_KEYWORD = "calldata";

CASE_KEYWORD = "case";

(* Introduced in 0.6.0 *)
CATCH_KEYWORD = "catch";

CONSTANT_KEYWORD = "constant";

(* Introduced in 0.4.22 *)
(* Reserved in 0.5.0 *)
CONSTRUCTOR_KEYWORD = "constructor";

CONTINUE_KEYWORD = "continue";

CONTRACT_KEYWORD = "contract";

(* Reserved in 0.5.0 *)
COPY_OF_KEYWORD = "copyof";

DAYS_KEYWORD = "days";

DEFAULT_KEYWORD = "default";

(* Reserved in 0.5.0 *)
DEFINE_KEYWORD = "define";

DELETE_KEYWORD = "delete";

DO_KEYWORD = "do";

ELSE_KEYWORD = "else";

(* Introduced in 0.4.21 *)
(* Reserved in 0.5.0 *)
EMIT_KEYWORD = "emit";

ENUM_KEYWORD = "enum";

(* Introduced in 0.8.4 *)
(* Never reserved *)
ERROR_KEYWORD = "error";

ETHER_KEYWORD = "ether";

EVENT_KEYWORD = "event";

EXTERNAL_KEYWORD = "external";

(* Reserved in 0.6.0 *)
FALLBACK_KEYWORD = "fallback";

FALSE_KEYWORD = "false";

FINAL_KEYWORD = "final";

(* Deprecated in 0.7.0 *)
(* Reserved until 0.7.0 *)
FINNEY_KEYWORD = "finney";

FIXED_KEYWORD = "fixed";

FIXED_KEYWORD = "fixed" ("8" | "16" | "24" | "32" | "40" | "48" | "56" | "64" | "72" | "80" | "88" | "96" | "104" | "112" | "120" | "128" | "136" | "144" | "152" | "160" | "168" | "176") "x" ("8" | "16" | "24" | "32" | "40" | "48" | "56" | "64" | "72" | "80");

FIXED_KEYWORD = "fixed" ("184x8" | "184x16" | "184x24" | "184x32" | "184x40" | "184x48" | "184x56" | "184x64" | "184x72" | "192x8" | "192x16" | "192x24" | "192x32" | "192x40" | "192x48" | "192x56" | "192x64" | "200x8" | "200x16" | "200x24" | "200x32" | "200x40" | "200x48" | "200x56" | "208x8" | "208x16" | "208x24" | "208x32" | "208x40" | "208x48" | "216x8" | "216x16" | "216x24" | "216x32" | "216x40" | "224x8" | "224x16" | "224x24" | "224x32" | "232x8" | "232x16" | "232x24" | "240x8" | "240x16" | "248x8");

(* Reserved in 0.4.14 *)
FIXED_KEYWORD = "fixed" ("184x80" | "192x72" | "192x80" | "200x64" | "200x72" | "200x80" | "208x56" | "208x64" | "208x72" | "208x80" | "216x48" | "216x56" | "216x64" | "216x72" | "216x80" | "224x40" | "224x48" | "224x56" | "224x64" | "224x72" | "224x80" | "232x32" | "232x40" | "232x48" | "232x56" | "232x64" | "232x72" | "232x80" | "240x24" | "240x32" | "240x40" | "240x48" | "240x56" | "240x64" | "240x72" | "240x80" | "248x16" | "248x24" | "248x32" | "248x40" | "248x48" | "248x56" | "248x64" | "248x72" | "248x80" | "256x8" | "256x16" | "256x24" | "256x32" | "256x40" | "256x48" | "256x56" | "256x64" | "256x72" | "256x80");

(* Reserved in 0.4.14 *)
FIXED_KEYWORD = "fixed" ("8" | "16" | "24" | "32" | "40" | "48" | "56" | "64" | "72" | "80" | "88" | "96" | "104" | "112" | "120" | "128" | "136" | "144" | "152" | "160" | "168" | "176" | "184" | "192" | "200" | "208" | "216" | "224" | "232" | "240" | "248" | "256") "x" ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "41" | "42" | "43" | "44" | "45" | "46" | "47" | "49" | "50" | "51" | "52" | "53" | "54" | "55" | "57" | "58" | "59" | "60" | "61" | "62" | "63" | "65" | "66" | "67" | "68" | "69" | "70" | "71" | "73" | "74" | "75" | "76" | "77" | "78" | "79");

FOR_KEYWORD = "for";

(* Never reserved *)
FROM_KEYWORD = "from";

FUNCTION_KEYWORD = "function";

(* Introduced in 0.8.13 *)
(* Never reserved *)
GLOBAL_KEYWORD = "global";

(* Introduced in 0.6.11 *)
(* Reserved in 0.7.0 *)
GWEI_KEYWORD = "gwei";

HEX_KEYWORD = "hex";

HOURS_KEYWORD = "hours";

IF_KEYWORD = "if";

(* Introduced in 0.6.5 *)
(* Reserved in 0.5.0 *)
IMMUTABLE_KEYWORD = "immutable";

(* Reserved in 0.5.0 *)
IMPLEMENTS_KEYWORD = "implements";

IMPORT_KEYWORD = "import";

INDEXED_KEYWORD = "indexed";

IN_KEYWORD = "in";

INLINE_KEYWORD = "inline";

INTERFACE_KEYWORD = "interface";

INTERNAL_KEYWORD = "internal";

INT_KEYWORD = "int" ("8" | "16" | "24" | "32" | "40" | "48" | "56" | "64" | "72" | "80" | "88" | "96" | "104" | "112" | "120" | "128" | "136" | "144" | "152" | "160" | "168" | "176" | "184" | "192" | "200" | "208" | "216" | "224" | "232" | "240" | "248" | "256")?;

IS_KEYWORD = "is";

LET_KEYWORD = "let";

LIBRARY_KEYWORD = "library";

(* Reserved in 0.5.0 *)
MACRO_KEYWORD = "macro";

MAPPING_KEYWORD = "mapping";

MATCH_KEYWORD = "match";

MEMORY_KEYWORD = "memory";

MINUTES_KEYWORD = "minutes";

MODIFIER_KEYWORD = "modifier";

(* Reserved in 0.5.0 *)
MUTABLE_KEYWORD = "mutable";

NEW_KEYWORD = "new";

NULL_KEYWORD = "null";

OF_KEYWORD = "of";

(* Introduced in 0.6.0 *)
(* Reserved in 0.5.0 *)
OVERRIDE_KEYWORD = "override";

(* Reserved in 0.5.0 *)
PARTIAL_KEYWORD = "partial";

PAYABLE_KEYWORD = "payable";

PRAGMA_KEYWORD = "pragma";

PRIVATE_KEYWORD = "private";

(* Reserved in 0.5.0 *)
PROMISE_KEYWORD = "promise";

PUBLIC_KEYWORD = "public";

(* Introduced in 0.4.16 *)
PURE_KEYWORD = "pure";

(* Reserved in 0.6.0 *)
RECEIVE_KEYWORD = "receive";

(* Reserved in 0.5.0 *)
REFERENCE_KEYWORD = "reference";

RELOCATABLE_KEYWORD = "relocatable";

RETURN_KEYWORD = "return";

RETURNS_KEYWORD = "returns";

(* Introduced in 0.8.4 *)
(* Never reserved *)
REVERT_KEYWORD = "revert";

(* Reserved in 0.5.0 *)
SEALED_KEYWORD = "sealed";

SECONDS_KEYWORD = "seconds";

(* Reserved in 0.5.0 *)
SIZE_OF_KEYWORD = "sizeof";

STATIC_KEYWORD = "static";

STORAGE_KEYWORD = "storage";

STRING_KEYWORD = "string";

STRUCT_KEYWORD = "struct";

(* Reserved in 0.5.0 *)
SUPPORTS_KEYWORD = "supports";

SWITCH_KEYWORD = "switch";

(* Deprecated in 0.7.0 *)
(* Reserved until 0.7.0 *)
SZABO_KEYWORD = "szabo";

(* Deprecated in 0.5.0 *)
THROW_KEYWORD = "throw";

(* Introduced in 0.8.27 *)
(* Never reserved *)
TRANSIENT_KEYWORD = "transient";

TRUE_KEYWORD = "true";

(* Introduced in 0.6.0 *)
TRY_KEYWORD = "try";

(* Reserved in 0.5.0 *)
TYPE_DEF_KEYWORD = "typedef";

(* Introduced in 0.5.3 *)
TYPE_KEYWORD = "type";

TYPE_OF_KEYWORD = "typeof";

UFIXED_KEYWORD = "ufixed";

UFIXED_KEYWORD = "ufixed" ("8" | "16" | "24" | "32" | "40" | "48" | "56" | "64" | "72" | "80" | "88" | "96" | "104" | "112" | "120" | "128" | "136" | "144" | "152" | "160" | "168" | "176") "x" ("8" | "16" | "24" | "32" | "40" | "48" | "56" | "64" | "72" | "80");

UFIXED_KEYWORD = "ufixed" ("184x8" | "184x16" | "184x24" | "184x32" | "184x40" | "184x48" | "184x56" | "184x64" | "184x72" | "192x8" | "192x16" | "192x24" | "192x32" | "192x40" | "192x48" | "192x56" | "192x64" | "200x8" | "200x16" | "200x24" | "200x32" | "200x40" | "200x48" | "200x56" | "208x8" | "208x16" | "208x24" | "208x32" | "208x40" | "208x48" | "216x8" | "216x16" | "216x24" | "216x32" | "216x40" | "224x8" | "224x16" | "224x24" | "224x32" | "232x8" | "232x16" | "232x24" | "240x8" | "240x16" | "248x8");

(* Reserved in 0.4.14 *)
UFIXED_KEYWORD = "ufixed" ("184x80" | "192x72" | "192x80" | "200x64" | "200x72" | "200x80" | "208x56" | "208x64" | "208x72" | "208x80" | "216x48" | "216x56" | "216x64" | "216x72" | "216x80" | "224x40" | "224x48" | "224x56" | "224x64" | "224x72" | "224x80" | "232x32" | "232x40" | "232x48" | "232x56" | "232x64" | "232x72" | "232x80" | "240x24" | "240x32" | "240x40" | "240x48" | "240x56" | "240x64" | "240x72" | "240x80" | "248x16" | "248x24" | "248x32" | "248x40" | "248x48" | "248x56" | "248x64" | "248x72" | "248x80" | "256x8" | "256x16" | "256x24" | "256x32" | "256x40" | "256x48" | "256x56" | "256x64" | "256x72" | "256x80");

(* Reserved in 0.4.14 *)
UFIXED_KEYWORD = "ufixed" ("8" | "16" | "24" | "32" | "40" | "48" | "56" | "64" | "72" | "80" | "88" | "96" | "104" | "112" | "120" | "128" | "136" | "144" | "152" | "160" | "168" | "176" | "184" | "192" | "200" | "208" | "216" | "224" | "232" | "240" | "248" | "256") "x" ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "41" | "42" | "43" | "44" | "45" | "46" | "47" | "49" | "50" | "51" | "52" | "53" | "54" | "55" | "57" | "58" | "59" | "60" | "61" | "62" | "63" | "65" | "66" | "67" | "68" | "69" | "70" | "71" | "73" | "74" | "75" | "76" | "77" | "78" | "79");

UINT_KEYWORD = "uint" ("8" | "16" | "24" | "32" | "40" | "48" | "56" | "64" | "72" | "80" | "88" | "96" | "104" | "112" | "120" | "128" | "136" | "144" | "152" | "160" | "168" | "176" | "184" | "192" | "200" | "208" | "216" | "224" | "232" | "240" | "248" | "256")?;

(* Introduced in 0.8.0 *)
(* Reserved in 0.5.0 *)
UNCHECKED_KEYWORD = "unchecked";

USING_KEYWORD = "using";

(* Deprecated in 0.5.0 *)
VAR_KEYWORD = "var";

(* Introduced in 0.4.16 *)
VIEW_KEYWORD = "view";

(* Introduced in 0.6.0 *)
(* Reserved in 0.6.0 *)
VIRTUAL_KEYWORD = "virtual";

WEEKS_KEYWORD = "weeks";

WEI_KEYWORD = "wei";

WHILE_KEYWORD = "while";

(* Deprecated in 0.5.0 *)
YEARS_KEYWORD = "years";

Documentation#

Note

This section is under construction. You are more than welcome to contribute suggestions to our GitHub repository.