# Quick Start
Ecosystem Plugin for Optimism support in Ape.
## Dependencies
- [python3](https://www.python.org/downloads) version 3.9 up to 3.12.
## Installation
### via `ape`
You can install this plugin using `ape`:
```bash
ape plugins install optimism
```
or via config file:
```yaml
# ape-config.yaml
plugins:
- name: optimism
```
### via `pip`
You can install the latest release via [`pip`](https://pypi.org/project/pip/):
```bash
pip install ape-optimism
```
### via `setuptools`
You can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:
```bash
git clone https://github.com/ApeWorX/ape-optimism.git
cd ape-optimism
python3 setup.py install
```
## Quick Usage
Installing this plugin adds support for the Optimism ecosystem:
```bash
ape console --network optimism:sepolia
```
### OP Stack
Use the `optimism` base-class in any custom networks using the OP stack.
For example, to configure a custom network for Fraxtal network, add the following to your `pyproject.toml`
```toml
[[tool.ape.networks.custom]]
name = "mainnet"
ecosystem = "fraxtal"
# Tell Ape to use optimism as the base plugin, instead of ethereum.
base_ecosystem_plugin = "optimism"
chain_id = 252
# (optional): Configure an RPC. Else, Ape will select a random one automatically.
[tool.ape.node.fraxtal.mainnet]
uri = "https://rpc.frax.com"
```
Or equivalent `ape-config.yaml`:
```yaml
networks:
custom:
- name: mainnet
ecosystem: fraxtal
base_ecosystem_plugin: optimism
node:
fraxtal:
mainnet:
uri: https://rpc.frax.com
```
There are two main benefits of using Optimism as the base-class instead of Ethereum for networks using the OP stack:
1. **Closer defaults**: The block time default is `2` for Optimism networks, which may be a better default value than Ethereum's higher block time parameters.
2. **Existence of System Transactions**: The Optimism base-class is aware of system transactions, which are transactions invoked by the sequencer.
## Development
Comments, questions, criticisms and pull requests are welcomed.
Raw data
{
"_id": null,
"home_page": "https://github.com/ApeWorX/ape-optimism",
"name": "ape-optimism",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.9",
"maintainer_email": null,
"keywords": "ethereum",
"author": "ApeWorX Ltd.",
"author_email": "admin@apeworx.io",
"download_url": "https://files.pythonhosted.org/packages/72/ff/6c0e186cde8c565343bb6a376ccec25ff111780c461640d98d9328aa6d15/ape_optimism-0.8.3.tar.gz",
"platform": null,
"description": "# Quick Start\n\nEcosystem Plugin for Optimism support in Ape.\n\n## Dependencies\n\n- [python3](https://www.python.org/downloads) version 3.9 up to 3.12.\n\n## Installation\n\n### via `ape`\n\nYou can install this plugin using `ape`:\n\n```bash\nape plugins install optimism\n```\n\nor via config file:\n\n```yaml\n# ape-config.yaml\nplugins:\n - name: optimism\n```\n\n### via `pip`\n\nYou can install the latest release via [`pip`](https://pypi.org/project/pip/):\n\n```bash\npip install ape-optimism\n```\n\n### via `setuptools`\n\nYou can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:\n\n```bash\ngit clone https://github.com/ApeWorX/ape-optimism.git\ncd ape-optimism\npython3 setup.py install\n```\n\n## Quick Usage\n\nInstalling this plugin adds support for the Optimism ecosystem:\n\n```bash\nape console --network optimism:sepolia\n```\n\n### OP Stack\n\nUse the `optimism` base-class in any custom networks using the OP stack.\nFor example, to configure a custom network for Fraxtal network, add the following to your `pyproject.toml`\n\n```toml\n[[tool.ape.networks.custom]]\nname = \"mainnet\"\necosystem = \"fraxtal\"\n# Tell Ape to use optimism as the base plugin, instead of ethereum.\nbase_ecosystem_plugin = \"optimism\"\nchain_id = 252\n\n# (optional): Configure an RPC. Else, Ape will select a random one automatically.\n[tool.ape.node.fraxtal.mainnet]\nuri = \"https://rpc.frax.com\"\n```\n\nOr equivalent `ape-config.yaml`:\n\n```yaml\nnetworks:\n custom:\n - name: mainnet\n ecosystem: fraxtal\n base_ecosystem_plugin: optimism\n\nnode:\n fraxtal:\n mainnet:\n uri: https://rpc.frax.com\n```\n\nThere are two main benefits of using Optimism as the base-class instead of Ethereum for networks using the OP stack:\n\n1. **Closer defaults**: The block time default is `2` for Optimism networks, which may be a better default value than Ethereum's higher block time parameters.\n2. **Existence of System Transactions**: The Optimism base-class is aware of system transactions, which are transactions invoked by the sequencer.\n\n## Development\n\nComments, questions, criticisms and pull requests are welcomed.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "ape-optimism: Ape Ecosystem Plugin for Optimism",
"version": "0.8.3",
"project_urls": {
"Homepage": "https://github.com/ApeWorX/ape-optimism"
},
"split_keywords": [
"ethereum"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fe1a8c9444e555756dd13879c5d8eba8b085569dd49bd17aec6539cd4b3e2987",
"md5": "94542c0a453c4cda028a75264c225d7e",
"sha256": "4d263764922096debbd061eae8e5a3bb520573923958c1512fe518b894d8ac5d"
},
"downloads": -1,
"filename": "ape_optimism-0.8.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "94542c0a453c4cda028a75264c225d7e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9",
"size": 9068,
"upload_time": "2025-02-08T00:08:41",
"upload_time_iso_8601": "2025-02-08T00:08:41.979244Z",
"url": "https://files.pythonhosted.org/packages/fe/1a/8c9444e555756dd13879c5d8eba8b085569dd49bd17aec6539cd4b3e2987/ape_optimism-0.8.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "72ff6c0e186cde8c565343bb6a376ccec25ff111780c461640d98d9328aa6d15",
"md5": "ced26c6df203043079c6424574b267b3",
"sha256": "eb48e34923759761a9c27b9d314c61530dbea1c4627be48fc4ca8fed623d7f72"
},
"downloads": -1,
"filename": "ape_optimism-0.8.3.tar.gz",
"has_sig": false,
"md5_digest": "ced26c6df203043079c6424574b267b3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.9",
"size": 17641,
"upload_time": "2025-02-08T00:08:43",
"upload_time_iso_8601": "2025-02-08T00:08:43.148817Z",
"url": "https://files.pythonhosted.org/packages/72/ff/6c0e186cde8c565343bb6a376ccec25ff111780c461640d98d9328aa6d15/ape_optimism-0.8.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-08 00:08:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ApeWorX",
"github_project": "ape-optimism",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ape-optimism"
}