Skip to content

Commit

Permalink
Changed headings:
Browse files Browse the repository at this point in the history
  Syntax -> Function signature
  Arguments -> Parameters
Removed italics from parameter names
  • Loading branch information
stoobie committed Apr 25, 2024
1 parent 6b1a05f commit 5e1280c
Showing 1 changed file with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
----
Expand All @@ -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
Expand All @@ -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"]
----
Expand Down Expand Up @@ -102,7 +102,7 @@ let block number = block_info.block_number;
== `call_contract`

[discrete]
=== Syntax
=== Function signature

[source,cairo,subs="+quotes,+macros"]
----
Expand All @@ -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
Expand All @@ -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"]
----
Expand All @@ -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
Expand All @@ -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"]
----
Expand All @@ -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
Expand Down Expand Up @@ -245,7 +245,7 @@ emit_event_syscall(keys, values).unwrap_syscall();
== `library_call`

[discrete]
=== Syntax
=== Function signature

[source,cairo,subs="+quotes,+macros"]
----
Expand All @@ -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
Expand All @@ -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"]
----
Expand All @@ -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
Expand Down Expand Up @@ -335,7 +335,7 @@ send_message_to_l1_syscall(payload).unwrap_syscall();
== `replace_class`

[discrete]
=== Syntax
=== Function signature

[source,cairo,subs="+quotes,+macros"]
----
Expand All @@ -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
Expand All @@ -377,7 +377,7 @@ link:https://github.com/starkware-libs/cairo/blob/cca08c898f0eb3e58797674f20994d
== `storage_read`

[discrete]
=== Syntax
=== Function signature

[source,cairo,subs="+quotes,+macros"]
----
Expand All @@ -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
Expand Down Expand Up @@ -429,7 +429,7 @@ storage_read_syscall(0, storage_address).unwrap_syscall()
== `storage_write`

[discrete]
=== Syntax
=== Function signature

[source,cairo,subs="+quotes,+macros"]
----
Expand All @@ -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
Expand Down

0 comments on commit 5e1280c

Please sign in to comment.