diff --git a/CHANGELOG.md b/CHANGELOG.md index a5bc5636fd..089af923c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 #### Changed - `declare` and `verify` commands now use the Scarb `release` profile instead of the `dev` profile as the default for building artifacts +- StarkScan links now point to specific pages for transactions, contracts and classes. #### Fixed diff --git a/crates/sncast/src/helpers/block_explorer.rs b/crates/sncast/src/helpers/block_explorer.rs index 8a7da6a3b2..0fb43fe87d 100644 --- a/crates/sncast/src/helpers/block_explorer.rs +++ b/crates/sncast/src/helpers/block_explorer.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; use starknet::core::types::Felt; -const STARKSCAN: &str = "https://starkscan.co/search"; +const STARKSCAN: &str = "https://starkscan.co"; const VOYAGER: &str = "https://voyager.online"; const VIEWBLOCK: &str = "https://viewblock.io/starknet"; const OKLINK: &str = "https://www.oklink.com/starknet"; @@ -40,15 +40,15 @@ pub struct StarkScan; impl LinkProvider for StarkScan { fn transaction(&self, hash: Felt) -> String { - format!("{STARKSCAN}/{hash:x}") + format!("{STARKSCAN}/tx/{hash:x}") } fn class(&self, hash: Felt) -> String { - format!("{STARKSCAN}/{hash:x}") + format!("{STARKSCAN}/class/{hash:x}") } fn contract(&self, address: Felt) -> String { - format!("{STARKSCAN}/{address:x}") + format!("{STARKSCAN}/contract/{address:x}") } } diff --git a/docs/src/starknet/account.md b/docs/src/starknet/account.md index 477370a397..f1971120f6 100644 --- a/docs/src/starknet/account.md +++ b/docs/src/starknet/account.md @@ -27,7 +27,7 @@ $ sncast \ account create \ --url http://127.0.0.1:5050 \ --name some-name - + Account successfully created. Prefund generated address with at least 432300000000 tokens. It is good to send more in the case of higher demand, max_fee * 2 = 864600000000 command: account create max_fee: 0x64a7168300 @@ -38,7 +38,7 @@ account: https://starkscan.co/search/0x7a949e83b2... ``` You can also pass common `--accounts-file` argument with a path to (existing or not existing) file where you want to save account info. - + For a detailed CLI description, see [account create command reference](../appendix/sncast/account/create.md). @@ -59,17 +59,17 @@ $ sncast \ --name some-name \ --fee-token strk \ --max-fee 9999999999999 - + command: account deploy transaction_hash: 0x20b20896ce63371ef015d66b4dd89bf18c5510a840b4a85a43a983caa6e2579 - + To see invocation details, visit: -transaction: https://starkscan.co/search/0x20b20896ce... +transaction: https://starkscan.co/tx/0x20b20896ce... ``` - + Note that you don't have to pass `url`, `accounts-file` and `network` parameters if `add-profile` flag was set in the `account create` command. Just pass `profile` argument with the account name. - + For a detailed CLI description, see [account deploy command reference](../appendix/sncast/account/deploy.md). > 💡 **Info** @@ -84,7 +84,7 @@ $ sncast \ account create \ --name some-name \ --salt 0x1 - + Account successfully created. Prefund generated address with at least 432300000000 tokens. It is good to send more in the case of higher demand, max_fee * 2 = 864600000000 command: account create max_fee: 0x64a7168300 @@ -104,7 +104,7 @@ $ sncast \ account delete \ --name some-name \ --network alpha-sepolia - + Do you want to remove account some-name from network alpha-sepolia? (Y/n) Y command: account delete @@ -177,7 +177,7 @@ command: account deploy transaction_hash: 0x20b20896ce63371ef015d66b4dd89bf18c5510a840b4a85a43a983caa6e2579 To see invocaton details, visit: -transaction: https://starkscan.co/search/0x20b20896ce... +transaction: https://starkscan.co/tx/0x20b20896ce... ``` ### Using Keystore and Starkli Account diff --git a/docs/src/starknet/invoke.md b/docs/src/starknet/invoke.md index 4cd2b11019..bab2c4af56 100644 --- a/docs/src/starknet/invoke.md +++ b/docs/src/starknet/invoke.md @@ -25,12 +25,12 @@ $ sncast \ --contract-address 0x4a739ab73aa3cac01f9da5d55f49fb67baee4919224454a2e3f85b16462a911 \ --function "some_function" \ --calldata 1 2 0x1e - + command: invoke transaction_hash: 0x7ad0d6e449e33b6581a4bb8df866c0fce3919a5ee05a30840ba521dafee217f To see invocation details, visit: -transaction: https://starkscan.co/search/0x7ad0d6e449... +transaction: https://starkscan.co/tx/0x7ad0d6e449... ``` > 💡 **Info** @@ -48,10 +48,10 @@ $ sncast invoke \ --fee-token strk \ --contract-address 0x4a739ab73aa3cac01f9da5d55f49fb67baee4919224454a2e3f85b16462a911 \ --function "function_without_params" - + command: invoke transaction_hash: 0x7ad0d6e449e33b6581a4bb8df866c0fce3919a5ee05a30840ba521dafee217f To see invocation details, visit: -transaction: https://starkscan.co/search/0x7ad0d6e449... +transaction: https://starkscan.co/tx/0x7ad0d6e449... ``` diff --git a/docs/src/starknet/multicall.md b/docs/src/starknet/multicall.md index 12d9bd0288..79a61352d7 100644 --- a/docs/src/starknet/multicall.md +++ b/docs/src/starknet/multicall.md @@ -47,7 +47,7 @@ command: multicall transaction_hash: 0x38fb8a0432f71bf2dae746a1b4f159a75a862e253002b48599c9611fa271dcb To see invocation details, visit: -transaction: https://starkscan.co/search/0x38fb8a0432... +transaction: https://starkscan.co/tx/0x38fb8a0432... ``` > 💡 **Info**