From d0ee7e182508cc34b6b005420cd721e7a17bbcfb Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Sun, 17 Nov 2024 18:51:54 -0800 Subject: [PATCH] feat: readmes --- README.md | 132 +++++++++++++++++++++++++------------------- contracts/README.md | 84 +++++++++------------------- 2 files changed, 102 insertions(+), 114 deletions(-) diff --git a/README.md b/README.md index 827b109..e37542f 100644 --- a/README.md +++ b/README.md @@ -1,87 +1,107 @@ -#

A Tangle Blueprint 🌐

+#

Rollup-as-a-Service Tangle Blueprints 🌐

-**A simple Hello World Blueprint for Tangle** +# Tangle Network Blueprints 🌐 -## 📚 Prerequisites +A collection of official blueprints for the Tangle Network, providing ready-to-use service implementations for various blockchain infrastructure needs. -Before you can run this project, you will need to have the following software installed on your machine: +## Available Blueprints -- [Rust](https://www.rust-lang.org/tools/install) -- [Forge](https://getfoundry.sh) -- [Tangle](https://github.com/tangle-network/tangle?tab=readme-ov-file#-getting-started-) +### Arbitrum Orbit RaaS (Rollup-as-a-Service) -You will also need to install [cargo-tangle](https://crates.io/crates/cargo-tangle), our CLI tool for creating and -deploying Tangle Blueprints: +Deploy and manage Arbitrum Orbit chains through a standardized service interface. This blueprint provides comprehensive management of Orbit chain deployments with the following features: -To install the Tangle CLI, run the following command: +#### Initial Deployment +- Automated Orbit chain deployment with customizable configurations +- Support for both ETH and ERC20 native tokens +- Configurable token bridge setup +- Custom fee token configuration +- Data availability committee settings -> Supported on Linux, MacOS, and Windows (WSL2) +#### Chain Management Features +The blueprint provides several management jobs that can be triggered through the Tangle Network: -```bash -curl --proto '=https' --tlsv1.2 -LsSf https://github.com/tangle-network/gadget/releases/download/cargo-tangle-v0.1.2/cargo-tangle-installer.sh | sh -``` +1. **Validator Management** + - Add/remove chain validators + - Enable/disable validator sets -Or, if you prefer to install the CLI from crates.io: +2. **Executor Management** + - Configure privileged executors + - Manage executor permissions -```bash -cargo install cargo-tangle --force # to get the latest version. -``` +3. **Batch Poster Configuration** + - Set batch poster addresses + - Enable/disable batch posters -## 🚀 Getting Started +4. **Fee Management** + - Configure fee recipients + - Set fee distribution weights -Once `cargo-tangle` is installed, you can create a new project with the following command: +5. **Fast Withdrawals** + - Configure withdrawal confirmers + - Enable/disable fast withdrawal functionality -```sh -cargo tangle blueprint create --name -``` +## Prerequisites -and follow the instructions to create a new project. +- [Rust](https://www.rust-lang.org/tools/install) +- [Node.js](https://nodejs.org/) (v16 or later) +- [Foundry](https://getfoundry.sh) +- [Tangle CLI](https://github.com/tangle-network/tangle) -## 🛠️ Development +## Environment Setup -Once you have created a new project, you can run the following command to start the project: +Required environment variables: +```bash +PARENT_CHAIN_RPC= # Parent chain RPC endpoint -```sh -cargo build +UPGRADE_EXECUTOR_ADDRESS= # Address of the upgrade executor +OWNER_ADDRESS= # Owner address for management operations +OWNER_PRIVATE_KEY= # Private key for signing transactions ``` -to build the project, and +## Development -```sh +### Build +**Build smart contracts** +```bash +forge build +``` +**Build service implementation** +```bash +cargo build --release +``` +**Deploy blueprint to Tangle Network** +```bash cargo tangle blueprint deploy ``` -to deploy the blueprint to the Tangle network. - -## 📚 Overview - -This project is about creating a simple Hello World Blueprint for Tangle and EigenLayer. -Blueprints are specifications for AVSs on the Tangle Network. An AVS is -an off-chain service that runs arbitrary computations for a user-specified period of time. - -Blueprints provide a useful abstraction, allowing developers to create reusable service infrastructures as if they were -smart contracts. This enables developers to monetize their work and align long-term incentives with the success of their -creations, benefiting proportionally to their Blueprint's usage. +## Architecture -For more details, please refer to the [project documentation](https://docs.tangle.tools/developers/blueprints). +### Smart Contracts +The blueprint includes smart contracts for: +- Service registration and management +- Configuration storage and validation +- Access control and permissions -## 📜 License +### Service Implementation +Built with Rust and the Tangle Network SDK, featuring: +- TypeScript scripts for chain interaction +- Job handlers for management operations +- Secure configuration management +- Event-driven architecture -Licensed under either of +## Security Considerations -* Apache License, Version 2.0 - ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) -* MIT license - ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) +- One-time initialization for critical components +- Role-based access control for management operations +- Protected configuration updates +- Secure key management requirements -at your option. +## Contributing -## 📬 Feedback and Contributions +We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details. -We welcome feedback and contributions to improve this blueprint. -Please open an issue or submit a pull request on -our [GitHub repository](https://github.com/tangle-network/blueprint-template/issues). +## License -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in the work by you, as defined in the Apache-2.0 license, shall be -dual licensed as above, without any additional terms or conditions. +Licensed under: +- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE)) +- MIT License ([LICENSE-MIT](LICENSE-MIT)) \ No newline at end of file diff --git a/contracts/README.md b/contracts/README.md index 9265b45..85886f4 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -1,66 +1,34 @@ -## Foundry +# Orbit RaaS Blueprint -**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** +The Orbit RaaS (Rollup-as-a-Service) Blueprint is a smart contract that manages the configuration and deployment of Arbitrum Orbit chains. -Foundry consists of: +## Overview -- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). -- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. -- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. -- **Chisel**: Fast, utilitarian, and verbose solidity REPL. +The `OrbitRaaSBlueprint` contract extends `BlueprintServiceManagerBase` and provides functionality to: -## Documentation +- Register operators who can manage Orbit chains +- Store and manage rollup configurations for each service ID +- Handle service requests to create new Orbit chains -https://book.getfoundry.sh/ +## Key Features -## Usage +### Rollup Configuration +Each Orbit chain can be configured with: +- Chain ID +- Owner address +- Validator set +- Batch poster addresses +- Native token settings +- Data availability committee settings +- Custom fee token options +- Token bridge setup preferences -### Build +### Operator Management +- Operators must register before managing chains +- Operator addresses are derived from their public keys +- Only registered operators can create and manage chains -```shell -$ forge build -``` - -### Test - -```shell -$ forge test -``` - -### Format - -```shell -$ forge fmt -``` - -### Gas Snapshots - -```shell -$ forge snapshot -``` - -### Anvil - -```shell -$ anvil -``` - -### Deploy - -```shell -$ forge script script/Counter.s.sol:CounterScript --rpc-url --private-key -``` - -### Cast - -```shell -$ cast -``` - -### Help - -```shell -$ forge --help -$ anvil --help -$ cast --help -``` +### Service Management +- Each service has a unique ID +- Service requests create new Orbit chains with specified configurations +- Configurations are stored and retrievable by service ID