From b51bdb2c7a3583888dbf30c94240cbad72453b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaya=20G=C3=B6kalp?= Date: Thu, 23 May 2024 08:39:59 -0700 Subject: [PATCH 1/2] chore: fund test suite's account by default in local-test node (#5935) ## Description Funds account associated with `de97d8624a438121b86a1956544bd72ed68cd69f2c99555b08b1e8c51ffd511c` which is used in the test suite. This is done since locally we tend to rely on ci's initial state which should include this account so that some deployment transactions (required for updating contract ids) can be executed. --- .github/workflows/local-testnode/state_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/local-testnode/state_config.json b/.github/workflows/local-testnode/state_config.json index e71fabb39f0..6870d84d716 100644 --- a/.github/workflows/local-testnode/state_config.json +++ b/.github/workflows/local-testnode/state_config.json @@ -5,7 +5,7 @@ "output_index": 0, "tx_pointer_block_height": 0, "tx_pointer_tx_idx": 0, - "owner": "6b63804cfbf9856e68e5b6e7aef238dc8311ec55bec04df774003a2c96e0418e", + "owner": "de97d8624a438121b86a1956544bd72ed68cd69f2c99555b08b1e8c51ffd511c", "amount": 1152921504606846976, "asset_id": "0000000000000000000000000000000000000000000000000000000000000000" }, From e4088e0c582313e47b870c0051657f040ba338f1 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 24 May 2024 03:57:34 +0800 Subject: [PATCH 2/2] chore: fix some comments (#5989) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Fixes some comments and panic messages grammatically. Signed-off-by: cuishuang Co-authored-by: Sophie Dankel <47993817+sdankel@users.noreply.github.com> Co-authored-by: Kaya Gökalp --- forc-pkg/src/pkg.rs | 2 +- forc-plugins/forc-client/src/util/tx.rs | 2 +- sway-core/src/asm_generation/miden_vm/miden_vm_asm_builder.rs | 2 +- .../semantic_analysis/ast_node/expression/intrinsic_function.rs | 2 +- .../ast_node/expression/match_expression/analysis/patstack.rs | 2 +- .../ast_node/expression/match_expression/analysis/pattern.rs | 2 +- sway-ir/src/verify.rs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/forc-pkg/src/pkg.rs b/forc-pkg/src/pkg.rs index b4f62da1e83..1b1cb979fef 100644 --- a/forc-pkg/src/pkg.rs +++ b/forc-pkg/src/pkg.rs @@ -2230,7 +2230,7 @@ pub fn contract_id( contract.id(salt, &contract.root(), &state_root) } -/// Checks if there are conficting `Salt` declarations for the contract dependencies in the graph. +/// Checks if there are conflicting `Salt` declarations for the contract dependencies in the graph. fn validate_contract_deps(graph: &Graph) -> Result<()> { // For each contract dependency node in the graph, check if there are conflicting salt // declarations. diff --git a/forc-plugins/forc-client/src/util/tx.rs b/forc-plugins/forc-client/src/util/tx.rs index c1588101d69..84441b79933 100644 --- a/forc-plugins/forc-client/src/util/tx.rs +++ b/forc-plugins/forc-client/src/util/tx.rs @@ -257,7 +257,7 @@ impl TransactionBuilderExt for Tran } })?; - // TODO: Do this via forc-wallet once the functinoality is exposed. + // TODO: Do this via forc-wallet once the functionality is exposed. let public_key = PublicKey::from(&secret_key); let hashed = public_key.hash(); let bech32 = Bech32Address::new(FUEL_BECH32_HRP, hashed); diff --git a/sway-core/src/asm_generation/miden_vm/miden_vm_asm_builder.rs b/sway-core/src/asm_generation/miden_vm/miden_vm_asm_builder.rs index 7b09afe1e41..ffde0c3eb4e 100644 --- a/sway-core/src/asm_generation/miden_vm/miden_vm_asm_builder.rs +++ b/sway-core/src/asm_generation/miden_vm/miden_vm_asm_builder.rs @@ -633,7 +633,7 @@ impl<'ir, 'eng> MidenVMAsmBuilder<'ir, 'eng> { if let Some(rendered) = rendered { rendered } else { - panic!("Not sure what this value is -- is'nt a constant or a configurable. {val:?}") + panic!("Not sure what this value is -- isn't a constant or a configurable. {val:?}") } } } diff --git a/sway-core/src/semantic_analysis/ast_node/expression/intrinsic_function.rs b/sway-core/src/semantic_analysis/ast_node/expression/intrinsic_function.rs index afeef64fe41..0a2ffbcc99f 100644 --- a/sway-core/src/semantic_analysis/ast_node/expression/intrinsic_function.rs +++ b/sway-core/src/semantic_analysis/ast_node/expression/intrinsic_function.rs @@ -655,7 +655,7 @@ fn type_check_cmp( /// Description: Returns transaction field with ID `tx_field_id` at index `index`, if applicable. /// This is a wrapper around FuelVM's `gtf` instruction: /// https://fuellabs.github.io/fuel-specs/master/vm/instruction_set#gtf-get-transaction-fields. -/// The resuting field is cast to `T`. +/// The resulting field is cast to `T`. /// Constraints: None. fn type_check_gtf( handler: &Handler, diff --git a/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/patstack.rs b/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/patstack.rs index 3fc82e30e09..1ce14a13170 100644 --- a/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/patstack.rs +++ b/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/patstack.rs @@ -97,7 +97,7 @@ impl PatStack { match self.pats.get_mut(n) { Some(elem) => Ok(elem), None => Err(handler.emit_err(CompileError::Internal( - "cant retrieve mutable reference to element", + "can't retrieve mutable reference to element", span.clone(), ))), } diff --git a/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/pattern.rs b/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/pattern.rs index da741ddd2fb..7de4cc88dc4 100644 --- a/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/pattern.rs +++ b/sway-core/src/semantic_analysis/ast_node/expression/match_expression/analysis/pattern.rs @@ -229,7 +229,7 @@ impl Pattern { /// /// --- /// - /// If if is the case that at lease one element of *args* is a + /// If it is the case that at lease one element of *args* is a /// or-pattern, then *args* is first "serialized". Meaning, that all /// or-patterns are extracted to create a vec of `PatStack`s *args*' where /// each `PatStack` is a copy of *args* where the index of the or-pattern is diff --git a/sway-ir/src/verify.rs b/sway-ir/src/verify.rs index 9e6a925aaf1..f394c8d5593 100644 --- a/sway-ir/src/verify.rs +++ b/sway-ir/src/verify.rs @@ -151,7 +151,7 @@ impl<'eng> Context<'eng> { } fn verify_metadata(&self, md_idx: Option) -> Result<(), IrError> { - // For now we check only that struct tags are valid identiers. + // For now we check only that struct tags are valid identifiers. if let Some(md_idx) = md_idx { match &self.metadata[md_idx.0] { Metadatum::List(md_idcs) => {