Optimism-python

Latest version: v0.2.3

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

Scan your dependencies

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

0.1.4

This is the initial release for optimism-python. Here are some of its functionalities:

- interact with various Optimism contracts through a Python wrapper (see below for the list of contracts)
- deposit ETH to the L2 chain
- withdraw ETH from the L2 chain

The following contracts are implemented:
- OptimismPortal
- L1StandardBridge / L2StandardBridge
- L1CrossChainMessenger /L2CrossChainMessenger
- L2OutputOracle
- L2ToL1MessagePasser

Here are some of its limitations which will be worked on in the future:
- no deposits and withdrawls of ERC20 tokens
- various utility functions in the CrossChainMessenger not implemented yet (i.e. get_deposits_by_address, get_withdrawls_by_address etc.)
- not unit tested

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.