Optimism-python

Latest version: v0.3.1

Safety actively analyzes 682334 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.3.1

Minor release that adds the [Base network](https://www.base.org/) to the SDK. Additionally, adds a Chains object that represents the different networks and abstracts away the chain IDs.

0.3.0

This is a major new release that updates the SDK to the changes caused by the introduction of the fault proofs. In particular, the following changes have been made:

- added the `DisputeGameFactory` and `FaultDisputeGame` contracts
- proving a withdrawal now queries the `DisputeGameFactory` instead of the `L2OutputOracle`. This has the added consequence that proving a withdrawal does not work anymore for OP chains that did not upgrade to fault proofs yet.
- changed the `OptimismPortal` to the new version

**IMPORTANT:** From now on, `optimism-python` only supports OP chains that moved to the [new upgrade that introduce fault proofs](https://github.com/ethereum-optimism/optimism/releases/tag/op-contracts%2Fv1.4.0-rc.4). If you need to interact with a chain that did not upgrade yet, downgrade `optimism-python` to the [previous release](https://github.com/rafalum/optimism-python/releases/tag/0.2.3).

0.2.3

Implemented the following helper functions in the CrossChainMessenger:

- `get_eth_deposits_by_address`: returns a list of ETH deposits (ETH bridged from L1 to L2) by the given address
- `get_erc20_deposits_by_address`: returns a list of ERC20 deposits (ERC20 bridged from L1 to L2) by the given address
- `get_eth_withdrawls_by_address`: returns a list of ETH withdrawls (ETH bridged from L2 to L1) by the given address
- `get_erc20_withdrawls_by_address`: returns a list of ERC20 withdrawls (ERC20 bridged from L2 to L1) by the given address

0.2.2

Minor update that fixes a bug in the StandardBridge contract. Further, it unifies the interface for the following functions in the CrossChainMessenger:

- `deposit_eth` / `deposit_erc20`: deposits ETH/ERC20 to the `account_l1`
- `deposit_eth_to` / `deposit_erc20_to`: deposits ETH/ERC20 to whoever is specified in the `to` argument
- `withdraw_eth` / `withdraw_erc20`: withdraws ETH/ERC20 to the `account_l2`
- `withdraw_eth_to` / `withdraw_erc20_to`: withdraws ETH/ERC20 to whoever is specified in the `to` argument

So if one wants to deposit ETH to the `account_l2`, the `deposit_eth_to` function has to be used with the `to` argument set to `account_l2.address`.

0.2.1

Minor update that gets rid of the network dependency and now uses the L1 and L2 chain IDs to determine which accounts, providers and addresses to use.

Changelog:

- refactored address.json into config.json file which contains all the L1/L2 pairs with their corresponding addresses
- remove `network` parameter in contracts and CrossChainMessenger

0.2.0

This is a major new release bringing the following new capabilities to optimism-python:

- deposit supported ERC20 tokens to L2
- withdraw supported ERC20 tokens to L1
- test cases for ETH deposits and withdrawls

Here are some of its limitations which will be worked on in the future:

- various utility functions in the CrossChainMessenger not implemented yet (i.e. get_deposits_by_address, get_withdrawls_by_address etc.)
- no test cases for ERC20 deposits and withdrawls

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.