-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update the zksync-cli section (#165)
# Description Update the ZKsync CLI section of the documentation with new pages for guides and refreshed CLI reference pages. Moved the Quickstart and ZKsync 101 into a new section called "Start coding 🚀". ## Linked Issues Resolves DEVRL-792
- Loading branch information
1 parent
d2d3e8e
commit 7ec9441
Showing
67 changed files
with
1,355 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title: Start Coding 🚀 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
content/00.build/20.zksync-cli/05.reading-transaction-data.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
title: Reading transaction data | ||
description: Use ZKsync CLI to easily read transaction data from the command line | ||
--- | ||
|
||
You can use the ZKsync CLI to fetch and display detailed information for a transaction. | ||
It can be used to check the status, amounts transferred, fees, method signatures, and arguments of transactions. | ||
|
||
```sh | ||
zksync-cli transaction info | ||
``` | ||
|
||
If you do not pass in any options to the command, the CLI prompts you to select the chain and transaction hash. | ||
|
||
```sh | ||
? Chain to use ZKsync Sepolia Testnet | ||
? Transaction hash 0x7f82dbf93281930ee01644d01a84b3f13df51d0082370298d353982f008f09e1 | ||
``` | ||
|
||
The CLI returns the transaction data along with the method arguments and additional details. | ||
|
||
```sh | ||
──────────────────── Main info ──────────────────── | ||
Transaction hash: 0x7f82dbf93281930ee01644d01a84b3f13df51d0082370298d353982f008f09e1 | ||
Status: completed | ||
From: 0xfAa77e3314c82cD5097B80Ab42C6A3749f33dEE6 | ||
To: 0x927488F48ffbc32112F1fF721759649A89721F8F | ||
Value: 0 ETH | ||
Fee: 0.00000220235 ETH | Initial: 0.0000520258 ETH Refunded: 0.00322339725 ETH | ||
Method: transfer(address to, uint256 amount) returns (bool) 0xa9059cbb | ||
|
||
───────────────── Method arguments ───────────────── | ||
[1] to (address): 0xfAa77e3314c82cD5097B80Ab42C6A3749f33dEE6 | ||
[2] amount (uint256): 1 | ||
|
||
───────────────────── Details ───────────────────── | ||
Date: 7/23/2024, 6:58:53 PM (15 hours ago) | ||
Block: #3515643 | ||
Nonce: 3 | ||
``` | ||
|
||
## --abi | ||
|
||
When ZKsync CLI reads a transaction that includes interaction with a smart contract's method, | ||
it first tries to fetch contract verification data from the server. | ||
If the contract is not verified, the CLI queries the [open signature](https://www.4byte.directory/) | ||
database to get the signature of the transaction method. | ||
If the CLI fails to find a matching method signature, the transaction data will be displayed as a hex string. | ||
|
||
You can manually pass the contract ABI data manually using the `--abi` option to decode the transaction's input data. | ||
|
||
```sh | ||
zksync-cli transaction info --abi "./Greeter.json" | ||
``` | ||
|
||
## --full | ||
|
||
The `--full` option will include additional details of the transaction which include the transaction status on L1. | ||
|
||
To see an example of the full data you receive with the `--full` option: | ||
|
||
```sh | ||
zksync-cli transaction info \ | ||
--chain "zksync-sepolia" \ | ||
--transaction "0x6fe7bcdbef11776095c7dd4283a54f51e60c0fe7cfc784fa52b9dcb8f2270f9f" \ | ||
--full | ||
``` | ||
|
||
## --raw | ||
|
||
The `--raw` option returns the transaction data as a raw JSON response. | ||
|
||
To see an example of the raw JSON data: | ||
|
||
```sh | ||
zksync-cli transaction info \ | ||
--chain "zksync-sepolia" \ | ||
--transaction "0x6fe7bcdbef11776095c7dd4283a54f51e60c0fe7cfc784fa52b9dcb8f2270f9f" \ | ||
--raw | ||
``` |
Oops, something went wrong.