{"id":22111888,"url":"https://github.com/justmert/arbitrum-python-sdk","last_synced_at":"2025-07-25T07:32:23.703Z","repository":{"id":231524154,"uuid":"730259365","full_name":"justmert/arbitrum-python-sdk","owner":"justmert","description":"Python library for client-side interactions with Arbitrum","archived":false,"fork":false,"pushed_at":"2024-07-05T17:27:54.000Z","size":5628,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-07T11:54:25.325Z","etag":null,"topics":["arbitrum"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justmert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-11T14:39:38.000Z","updated_at":"2024-07-05T17:27:57.000Z","dependencies_parsed_at":"2024-04-04T13:16:59.215Z","dependency_job_id":null,"html_url":"https://github.com/justmert/arbitrum-python-sdk","commit_stats":null,"previous_names":["justmert/arbitrum-python-sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justmert%2Farbitrum-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justmert%2Farbitrum-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justmert%2Farbitrum-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justmert%2Farbitrum-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justmert","download_url":"https://codeload.github.com/justmert/arbitrum-python-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227543575,"owners_count":17785196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arbitrum"],"created_at":"2024-12-01T10:53:19.291Z","updated_at":"2025-07-25T07:32:23.677Z","avatar_url":"https://github.com/justmert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arbitrum Python SDK\n\n[![npm version](https://badge.fury.io/js/%40arbitrum%2Fsdk.svg)](https://badge.fury.io/js/@arbitrum%2Fsdk.svg)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nA TypeScript library for client-side interactions with Arbitrum. The Arbitrum Python SDK provides essential helper functionality and direct access to underlying smart contract interfaces, enabling developers to build powerful applications on the Arbitrum network.\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e This is the code and documentation here are based on the official [@arbitrum/sdk v4](https://github.com/OffchainLabs/arbitrum-sdk) and have been rewritten in Python. Based release version: [v4.0.2](https://github.com/OffchainLabs/arbitrum-sdk/tree/v4.0.2)\n\u003e\n\u003e This repository is a community effort and is not officially supported by Offchain Labs. Please see the [disclaimer](#disclaimer) at the end of this document.\n\n* 📚 [Documentation](https://arbitrum-python-sdk.readthedocs.io)\n* 💡 [Tutorials](https://github.com/justmert/arbitrum-python-tutorials)\n\n## Table of Contents\n\n- [Arbitrum Python SDK](#arbitrum-python-sdk)\n  - [Table of Contents](#table-of-contents)\n  - [Overview](#overview)\n  - [Installation](#installation)\n  - [Key Features](#key-features)\n    - [Bridging Assets](#bridging-assets)\n    - [Cross-Chain Messages](#cross-chain-messages)\n    - [Network Configuration](#network-configuration)\n  - [Usage](#usage)\n  - [Running Integration Tests](#running-integration-tests)\n  - [Documentation](#documentation)\n  - [License](#license)\n  - [Disclaimer](#disclaimer)\n\n## Overview\n\nArbitrum Python SDK simplifies the process of interacting with Arbitrum chains, offering a robust set of tools for asset bridging and cross-chain messaging.\n\n## Installation\n\n```bash\npip3 install arbitrum_py\n```\n\n## Key Features\n\n### Bridging Assets\n\nArbitrum Python SDK facilitates the bridging of assets between an Arbitrum chain and its parent chain. Currently supported asset bridgers:\n\n- `EthBridger`: For bridging ETH to and from an Arbitrum chain (L2 or L3)\n- `Erc20Bridger`: For bridging ERC-20 tokens to and from an Arbitrum chain (L2 or L3)\n- `EthL1L3Bridger`: For bridging ETH to an L3 directly from L1\n- `Erc20L1L3Bridger`: For bridging ERC-20 tokens to an L3 directly from L1\n\n### Cross-Chain Messages\n\nCross-chain communication is handled through `ParentToChildMessage` and `ChildToParentMessage` classes. These encapsulate the lifecycle of messages sent between chains, typically created from transaction receipts that initiate cross-chain messages.\n\n### Network Configuration\n\nThe SDK comes preconfigured for Arbitrum One, Arbitrum Nova and Arbitrum Sepolia. Custom Arbitrum networks can be registered using `register_custom_arbitrum_network`, which is required before utilizing other SDK features.\n\n## Usage\n\nHere's a basic example of using the SDK to bridge ETH:\n\n```python\nfrom web3 import Web3\nfrom eth_account import Account\nfrom arbitrum_py.data_entities.networks import get_arbitrum_network\nfrom arbitrum_py.asset_bridger.eth_bridger import EthBridger\nfrom arbitrum_py.data_entities.signer_or_provider import SignerOrProvider\n\ndef bridge_eth(parent_signer: SignerOrProvider, child_chain_id: int):\n    child_network = get_arbitrum_network(child_chain_id)\n    eth_bridger = EthBridger(child_network)\n\n    deposit = eth_bridger.deposit({\n        'amount': Web3.to_wei(0.1, 'ether'),\n        'parentSigner': parent_signer,\n    })\n\n    print(f\"Deposit initiated: {deposit['transactionHash'].hex()}\")\n```\n\nFor more detailed usage examples and API references, please refer to the [Arbitrum Python SDK documentation](https://arbitrum-python-sdk.readthedocs.io) or check out the [tutorials](https://github.com/justmert/arbitrum-python-tutorials)\n\n## Running Tests\n\n1. Set up test nodes by following the instructions [here](https://docs.arbitrum.io/run-arbitrum-node/run-local-full-chain-simulation) or below quick setup:\n\n  ```sh\n  # Make sure docker is installed\n  git clone -b release --recurse-submodules https://github.com/OffchainLabs/nitro-testnode.git \u0026\u0026 cd nitro-testnode\n  chmod +x ./test-node.bash \u0026\u0026 \u0026\u0026 ./test-node.bash --init --tokenbridge --l3node --l3-token-bridge --blockscout --detach\n\n  # (Optional) You can fund default accounts with ETH using the following command\n  # https://docs.arbitrum.io/run-arbitrum-node/run-local-full-chain-simulation#blockscout\n\n  # Send 5 ETH to the dev account in L2 network. \n  ./test-node.bash script send-l2 --to 0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E --ethamount 5\n\n  # Send 5 ETH to the dev account in 12 network. \n  ./test-node.bash script send-l1 --to 0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E --ethamount 5\n  ```\n\n1. Copy `.env.example` to `.env` and update relevant environment variables.\n\n2. Install dependencies:\n\n  ```sh\n  pip install -r requirements.txt\n  ```\n\n4. Generate the network configuration against your active Nitro test node:\n\n  ```sh\n  python3 -m scripts.gen_network\n  ```\n\n5. Execute the integration tests:\n\n  ```sh\n  pytest tests\n  ```\n\n## Documentation\n\nFor comprehensive guides and API documentation, visit the [Arbitrum Python SDK Documentation](https://arbitrum-python-sdk.readthedocs.io). You can also find tutorials in the [Arbitrum Python Tutorials](https://github.com/justmert/arbitrum-python-tutorials)\n\n## License\n\nArbitrum Python SDK is released under the [Apache 2.0 License](LICENSE).\n\n## Disclaimer\n\nThe code contained within this package is meant for testing purposes only and does not guarantee any level of security. It has not undergone any formal audit or security analysis. Use it at your own risk. Any potential damages or security breaches occurring from the use of this code are not the responsibility of the author(s) or contributor(s) of this repository. Please exercise caution and due diligence while using this code in any environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustmert%2Farbitrum-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustmert%2Farbitrum-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustmert%2Farbitrum-python-sdk/lists"}