Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
fix(python-sdk): fix typos and update package name (#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
danijelTxFusion authored Feb 1, 2024
1 parent c506836 commit a084b1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/build/sdks/python/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ head:

While most of the existing SDKs should work out of the box, deploying smart contracts or using unique zkSync features, like account abstraction, requires providing additional fields to those that Ethereum transactions have by default.

To provide easy access to all the features of zkSync Era, the `zksync2-python` Python SDK was created, which is made in a way that has an interface very similar to those of
[web3.py](https://web3py.readthedocs.io/en/latest/index.html). In fact, `web3.py` is a peer dependency of our library and most of the objects exported by `zksync2-python` inherit from the corresponding `web3.py` objects and override only the fields that need to be changed.
To provide easy access to all the features of zkSync Era, the `zksync2` Python SDK was created, which is made in a way that has an interface very similar to those of
[web3.py](https://web3py.readthedocs.io/en/latest/index.html). In fact, `web3.py` is a peer dependency of our library and most of the objects exported by `zksync2` inherit from the corresponding `web3.py` objects and override only the fields that need to be changed.

## Prerequisites

- Python: >=3.9 ([installation guide](https://www.python.org/downloads/))
- Python: >=3.8 ([installation guide](https://www.python.org/downloads/))
- Pip: 23.1.2 ([installation guide](https://pip.pypa.io/en/stable/installation/))

## Adding dependencies
Expand Down
9 changes: 4 additions & 5 deletions docs/build/sdks/python/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ head:

A Web3 Provider object provides application-layer access to underlying blockchain networks.

The [`zksync2-python`](https://pypi.org/project/zksync2/) library supports provider methods from the [`web3py`](https://web3py.readthedocs.io/en/stable/providers.html) library and supplies additional functionality.
The [`zksync2`](https://pypi.org/project/zksync2/) library supports provider methods from the [`web3.py`](https://web3py.readthedocs.io/en/stable/providers.html) library and supplies additional functionality.

## `Provider`

:::info

- This doc details zkSync Era specific methods.
- Web3py implementations link to the [Web3[y] Providers documentation](https://web3py.readthedocs.io/en/stable/providers.html).
- `web3.py` implementations link to the [web3.py Providers documentation](https://web3py.readthedocs.io/en/stable/providers.html).
:::

### `init`
Expand Down Expand Up @@ -73,7 +73,7 @@ Returns an estimate(`int`) of the amount of gas required to submit a transaction
| Parameter | Type | Description |
| ------------- | ---------------------------------------------------------------------------------------------------- | -------------------- |
| `transaction` | [`Transaction`](./types.md#transaction) | Transaction request. |
[Web3py implementation.](https://web3py.readthedocs.io/en/stable/web3.eth.html#web3.eth.Eth.estimate_gas)
[web3.py implementation.](https://web3py.readthedocs.io/en/stable/web3.eth.html#web3.eth.Eth.estimate_gas)

### `zks_estimate_gas_l1_to_l2`

Expand Down Expand Up @@ -144,7 +144,6 @@ When block and token are not supplied, `committed` and `ETH` are the default val
| address | User's address. |
| block_tag | Block tag for getting the balance on. Latest `committed` block is default. |
| token_address | The address of the token. ETH is default. |
| |

```python
def zks_get_balance(self, address: HexStr, block_tag = ZkBlockParams.COMMITTED.value, token_address: HexStr = None) -> int:
Expand Down Expand Up @@ -176,7 +175,7 @@ eth_balance = zksync_web3.zksync.zks_get_balance("<YOUR_ADDRESS>")

Returns block from the network.Throws `BlockNotFound` error if the block is not found

[Web3py implementation.](https://web3py.readthedocs.io/en/stable/web3.eth.html#web3.eth.Eth.get_block)
[web3.py implementation.](https://web3py.readthedocs.io/en/stable/web3.eth.html#web3.eth.Eth.get_block)

### `zks_get_block_details`

Expand Down

0 comments on commit a084b1e

Please sign in to comment.