From 5e1280c9974542298f6c8144765eee140fea06ff Mon Sep 17 00:00:00 2001 From: Steve Goodman Date: Thu, 25 Apr 2024 15:07:42 +0300 Subject: [PATCH] Changed headings: Syntax -> Function signature Arguments -> Parameters Removed italics from parameter names --- .../Smart_Contracts/system-calls-cairo1.adoc | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/system-calls-cairo1.adoc b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/system-calls-cairo1.adoc index 0244425f26..276eaf1c60 100644 --- a/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/system-calls-cairo1.adoc +++ b/components/Starknet/modules/architecture_and_concepts/pages/Smart_Contracts/system-calls-cairo1.adoc @@ -7,7 +7,7 @@ accessing the contract's storage, that standalone programs do not require. The S == `get_block_hash` [discrete] -=== Syntax +=== Function signature [source,cairo,subs="+quotes,+macros"] ---- @@ -25,7 +25,7 @@ Gets the hash of a specific Starknet block within the range of `[__first_v0_12_0 === Arguments [horizontal,labelwidth="25",role="stripes-odd"] -`_block_number_ u64`:: The number of the block whose hash you want to get. +`block_number u64`:: The number of the block whose hash you want to get. [discrete] === Return values @@ -49,7 +49,7 @@ link:https://github.com/starkware-libs/cairo/blob/0c882679fdb24a818cad19f2c18dec == `get_execution_info` [discrete] -=== Syntax +=== Function signature [source,cairo,subs="+quotes,+macros"] ---- @@ -102,7 +102,7 @@ let block number = block_info.block_number; == `call_contract` [discrete] -=== Syntax +=== Function signature [source,cairo,subs="+quotes,+macros"] ---- @@ -127,9 +127,9 @@ If `call_contract_syscall` fails, this can't be caught and will therefore result === Arguments [horizontal,labelwidth=35] -`_address_`:: The address of the contract you want to call. -`_entry_point_selector_`:: A selector for a function within that contract. -`_calldata_`:: The calldata array. +`address`:: The address of the contract you want to call. +`entry_point_selector`:: A selector for a function within that contract. +`calldata`:: The calldata array. [discrete] === Return values @@ -153,7 +153,7 @@ If the interface of the called contract is available, then you can use a more st == `deploy` [discrete] -=== Syntax +=== Function signature [source,cairo,subs="+quotes,+macros"] ---- @@ -174,10 +174,10 @@ Deploys a new instance of a previously declared class. === Arguments [horizontal,labelwidth=35] -`_class_hash_`:: The class hash of the contract to be deployed. -`_contract_address_salt_`:: The salt, an arbitrary value provided by the sender, used in the computation of the xref:Smart_Contracts/contract-address.adoc[contract's address]. -`_calldata_`:: The constructor's calldata. An array of felts. -`_deploy_from_zero_`:: A flag used for the contract address computation. If not set, the caller address will be used as the new contract's deployer address, otherwise 0 is used. +`class_hash`:: The class hash of the contract to be deployed. +`contract_address_salt`:: The salt, an arbitrary value provided by the sender, used in the computation of the xref:Smart_Contracts/contract-address.adoc[contract's address]. +`calldata`:: The constructor's calldata. An array of felts. +`deploy_from_zero`:: A flag used for the contract address computation. If not set, the caller address will be used as the new contract's deployer address, otherwise 0 is used. [discrete] === Return values @@ -196,7 +196,7 @@ link:https://github.com/starkware-libs/cairo/blob/main/corelib/src/starknet/sysc == `emit_event` [discrete] -=== Syntax +=== Function signature [source,cairo,subs="+quotes,+macros"] ---- @@ -216,8 +216,8 @@ For more information, and for a higher-level syntax for emitting events, see xre === Arguments [horizontal,labelwidth=35] -`_keys_`:: The event's keys. These are analogous to Ethereum's event topics, you can use the link:https://github.com/starkware-libs/starknet-specs/blob/c270b8170684bb09741672a7a4ae5003670c3f43/api/starknet_api_openrpc.json#L569RPC[starknet_getEvents] method to filter by these keys. -`_data_`:: The event's data. +`keys`:: The event's keys. These are analogous to Ethereum's event topics, you can use the link:https://github.com/starkware-libs/starknet-specs/blob/c270b8170684bb09741672a7a4ae5003670c3f43/api/starknet_api_openrpc.json#L569RPC[starknet_getEvents] method to filter by these keys. +`data`:: The event's data. [discrete] === Return values @@ -245,7 +245,7 @@ emit_event_syscall(keys, values).unwrap_syscall(); == `library_call` [discrete] -=== Syntax +=== Function signature [source,cairo,subs="+quotes,+macros"] ---- @@ -265,9 +265,9 @@ This system call replaces the known delegate call functionality from Ethereum, w === Arguments [horizontal,labelwidth=35] -`_class_hash_`:: The hash of the class you want to use. -`_function_selector_`:: A selector for a function within that class. -`_calldata_`:: The calldata. +`class_hash`:: The hash of the class you want to use. +`function_selector`:: A selector for a function within that class. +`calldata`:: The calldata. [discrete] === Return values @@ -283,7 +283,7 @@ link:https://github.com/starkware-libs/cairo/blob/cca08c898f0eb3e58797674f20994d == `send_message_to_L1` [discrete] -=== Syntax +=== Function signature [source,cairo,subs="+quotes,+macros"] ---- @@ -305,8 +305,8 @@ For more information, see Starknet's xref:Network_Architecture/messaging-mechani === Arguments [horizontal,labelwidth=35] -`_to_address_`:: The recipient's L1 address. -`_payload_`:: The array containing the message payload +`to_address`:: The recipient's L1 address. +`payload`:: The array containing the message payload [discrete] === Return values @@ -335,7 +335,7 @@ send_message_to_l1_syscall(payload).unwrap_syscall(); == `replace_class` [discrete] -=== Syntax +=== Function signature [source,cairo,subs="+quotes,+macros"] ---- @@ -362,7 +362,7 @@ the `call_contract` syscall in the same transaction (after the replacement). === Arguments [horizontal,labelwidth=35] -`_class_hash_`:: The hash of the class you want to use as a replacement. +`class_hash`:: The hash of the class you want to use as a replacement. [discrete] === Return values @@ -377,7 +377,7 @@ link:https://github.com/starkware-libs/cairo/blob/cca08c898f0eb3e58797674f20994d == `storage_read` [discrete] -=== Syntax +=== Function signature [source,cairo,subs="+quotes,+macros"] ---- @@ -399,8 +399,8 @@ For information on accessing storage by using the storage variables, see xref:./ === Arguments [horizontal,labelwidth=35] -`_address_domain_`:: The domain of the key, used to separate between different data availability modes. This separation is used in Starknet to offer different data availability modes. Currently, only the onchain mode (where all updates go to L1), indicated by domain `0`, is supported. Other address domains which will be introduced in the future will behave differently in terms of publication (in particular, they will not be posted on L1, creating a tradeoff between cost and security). -`_address_`:: The requested storage address. +`address_domain`:: The domain of the key, used to separate between different data availability modes. This separation is used in Starknet to offer different data availability modes. Currently, only the onchain mode (where all updates go to L1), indicated by domain `0`, is supported. Other address domains which will be introduced in the future will behave differently in terms of publication (in particular, they will not be posted on L1, creating a tradeoff between cost and security). +`address`:: The requested storage address. [discrete] === Return values @@ -429,7 +429,7 @@ storage_read_syscall(0, storage_address).unwrap_syscall() == `storage_write` [discrete] -=== Syntax +=== Function signature [source,cairo,subs="+quotes,+macros"] ---- @@ -451,9 +451,9 @@ For information on accessing storage by using the storage variables, see xref:./ === Arguments [horizontal,labelwidth=35] -`_address_domain_`:: The domain of the key, used to separate between different data availability modes. This separation is used in Starknet to offer different data availability modes. Currently, only the onchain mode (where all updates go to L1), indicated by domain `0`, is supported. Other address domains which will be introduced in the future will behave differently in terms of publication (in particular, they will not be posted on L1, creating a tradeoff between cost and security). -`_address_`:: The requested storage address. -`_value_`:: The value to write to the key. +`address_domain`:: The domain of the key, used to separate between different data availability modes. This separation is used in Starknet to offer different data availability modes. Currently, only the onchain mode (where all updates go to L1), indicated by domain `0`, is supported. Other address domains which will be introduced in the future will behave differently in terms of publication (in particular, they will not be posted on L1, creating a tradeoff between cost and security). +`address`:: The requested storage address. +`value`:: The value to write to the key. [discrete] === Return values