-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
102 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,107 @@ | ||
# <h1 align="center"> A Tangle Blueprint 🌐 </h1> | ||
# <h1 align="center"> Rollup-as-a-Service Tangle Blueprints 🌐 </h1> | ||
|
||
**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 <project-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 <abbr title="Actively Validated Services">AVS</abbr>s 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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <your_rpc_url> --private-key <your_private_key> | ||
``` | ||
|
||
### Cast | ||
|
||
```shell | ||
$ cast <subcommand> | ||
``` | ||
|
||
### 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 |