Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some comments #566

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface IStarknetMessaging is IStarknetMessagingEvents {

/**
Sends a message to an L2 contract.
This function is payable, the payed amount is the message fee.
This function is payable, the paid amount is the message fee.

Returns the hash of the message and the nonce of the message.
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/starknet-devnet-server/src/api/json_rpc/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ mod tests {
// r#"{"block_id": {"block_hash":
// "0x004134134134134134134134134134134134134134134134134134134134134134"}}"#, );

// Block hash hex doesnt start with 0x
// Block hash hex doesn't start with 0x
assert_block_id_block_hash_correctness(
false,
"0x01",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl<'a> Visitor for RandDataGenerator<'a> {

fn do_for_one_of(&self, element: &OneOf) -> Result<serde_json::Value, String> {
let idx = rand::thread_rng().gen_range(0..element.one_of.len());
let schema = element.one_of.get(idx).ok_or("OneOf schema doesnt have entry".to_string())?;
let schema = element.one_of.get(idx).ok_or("OneOf schema doesn't have entry".to_string())?;

generate_schema_value(schema, self.schemas, self.depth)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/starknet-devnet-types/src/rpc/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub struct PendingBlockHeader {
#[serde(deny_unknown_fields)]
pub struct ResourcePrice {
// for now this will be always 0, this field is introduced in 0.5.0
// but current version of blockifier/starknet_api doesnt return this value
// but current version of blockifier/starknet_api doesn't return this value
pub price_in_fri: Felt,
pub price_in_wei: Felt,
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ impl Cairo0Json {
/// In rust serde_json library when deserializing a JSON object, internally it uses a Map either
/// HashMap or IndexMap. Depending on the feature enabled if [preserver_order] is not enabled
/// HashMap will be used. In HashMap the keys order of insertion is not preserved and they
/// are sorted alphabetically, which doesnt work for our case, because the contract artifact
/// are sorted alphabetically, which doesn't work for our case, because the contract artifact
/// contains keys under the "hints" property that are only numbers. So we use IndexMap to
/// preserve order of the keys, but its disadvantage is removing entries from the json object,
/// because it uses swap_remove method on IndexMap, which doesnt preserve order.
/// because it uses swap_remove method on IndexMap, which doesn't preserve order.
/// So we traverse the JSON object and remove all entries with key - attributes or
/// accessible_scopes if they are empty arrays.
fn compute_hinted_class_hash(contract_class: &Value) -> crate::error::DevnetResult<Felt> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub struct DataAvailability {
pub l1_data_gas: u128,
}

/// custom implementation, because serde_json doesnt support deserializing to u128
/// custom implementation, because serde_json doesn't support deserializing to u128
/// if the struct is being used as a field in another struct that have #[serde(flatten)] or
/// #[serde(untagged)]
impl<'de> Deserialize<'de> for DataAvailability {
Expand Down
2 changes: 1 addition & 1 deletion crates/starknet-devnet/tests/test_simulate_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mod simulation_tests {
/// usage. The fee from vm usage is the heaviest product of cairo resource usage multiplied
/// by cairo resource fee cost, rounded down to the nearest integer. There is a
/// possibility that although some of the resources present in the resp_no_flags are not in
/// resp_skip_validation, this doesnt mean that the fee will be higher, for example:
/// resp_skip_validation, this doesn't mean that the fee will be higher, for example:
/// the fee from vm usage is determined from the `steps` and the transaction that skips
/// validation might have less steps, but due to the rounding if the multiplied product
/// falls in the range (7,8] both will be rounded to 7
Expand Down