Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: On Pull Request

on:
workflow_dispatch:
pull_request:

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9.1

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build app
run: pnpm build
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

.ignore
.ignore

static/llms.txt
static/llmstxt
19 changes: 19 additions & 0 deletions docs/1_why.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Why AnyFlow?

### Vision

AnyFlow's vision is to become the go-to platform for all blockchain deployment and management needs. We aim to provide a seamless experience for both developers and non-tech users to deploy, manage, and monitor their smart contracts on multiple blockchains.

### The Old Way

We feel that the current smart contract deployment process are filled with tasks not directly related to the development of the smart contract. Not to mention the risks involved in managing the financial and operational aspects of the deployment in the developer's machine. And issues communicating with non-tech team members who need to manage the contracts and understand the contract's status.

### The New Way

We want to remove these tasks from your workflow and let you focus on what you do best: building amazing smart contracts. Let the financial and operational tasks be handled by us while we provide your non-tech team members with a user-friendly interface to manage the contracts.

Our platform is currently designed to save you time and effort by automating the deployment process and providing a user-friendly interface to manage your contracts. But in the future, we plan to offer more advanced features and tools to help you manage your smart contracts more efficiently no matter your level of expertise.

### You can help us improve

We're always open to feedback and suggestions on how we can improve our platform to better serve your needs. Feel free to reach out to us on [Discord](https://discord.gg/aCygGwBWya) or [Twitter/X](https://x.com/anyflow_) with any questions or ideas you may have. We look forward to hearing from you!
6 changes: 3 additions & 3 deletions docs/anyflow_cli/1_starting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ sidebar_position: 1

# Starting with Anyflow CLI

## First Use and Authentication

To get started with the AnyFlow CLI, you'll need to authenticate your session. Follow these steps:

1. **Initialize Your Project**: If you are starting a new project, navigate to your project directory:
Expand All @@ -27,7 +25,7 @@ To get started with the AnyFlow CLI, you'll need to authenticate your session. F
anyflow install
```

**Important Notes:**
## Important Notes
- The command will modify your `hardhat.config.js` or `hardhat.config.ts`
- It searches for a configuration object with the name containing "HardhatUserConfig"
- Example of valid configuration names:
Expand All @@ -43,3 +41,5 @@ To get started with the AnyFlow CLI, you'll need to authenticate your session. F
```
- If your configuration object doesn't include "HardhatUserConfig" in its name, the installation will fail
- Make sure to backup your configuration file before running this command
- If you have a custom configuration, you can manually update your configuration file
-
8 changes: 3 additions & 5 deletions docs/anyflow_cli/2_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,23 @@ sidebar_position: 2

# Authenticating

## Authentication Process

1. **Authenticate**: Run the following command to authenticate your session:

```bash
anyflow auth
```

**Steps to Authenticate:**
- This command will open the [AnyFlow Developer Portal](https://anyflow.pro/dev) in your browser.
- This command will open the [AnyFlow Web Application](https://app.anyflow.pro) in your browser.
- Log in using your GitHub account.
- Once logged in, copy your API key.
- Once logged in, go to your [API Keys](https://app.anyflow.pro/settings/api) setting and copy it.
- Return to your terminal and enter the API key when prompted to complete the authentication process.

2. **API Key Storage:**
- By default, your API key will be securely stored in your system's keychain.
- The storage method is automatically handled by the CLI to ensure maximum security.
- If keychain access is not available, the API key will be encrypted and stored in `~/.anyflow`.
- You can try to troubleshoot the keychain access issue [here](./4_keytar_troubleshoot.md).
<!-- - You can try to troubleshoot the keychain access issue [here](./4_keytar_troubleshoot.md). -->

3. **Verify Authentication**: After successful authentication, verify your login status by running:

Expand Down
36 changes: 25 additions & 11 deletions docs/anyflow_cli/3_deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ sidebar_position: 3

# Deploying

## Deploying a multichain contract

Before deploying your contract, ensure it's compiled using the Hardhat CLI:

```bash
Expand All @@ -15,37 +13,53 @@ hardhat compile
Once your project is compiled, you can deploy your contract using the AnyFlow CLI. The basic deployment syntax is:

```bash
anyflow deploy --networks <network_chain_id>
anyflow deploy --networks <network_chain_id> [--verify] [--deterministic-addresses]
```

### Example

You can deploy to multiple networks simultaneously by specifying their chain IDs as arguments:
You can deploy to multiple networks simultaneously by specifying their chain IDs or aliases as arguments:

```bash
anyflow deploy --networks 137 80002 11155111
anyflow deploy --networks polygon polygonAmoy 11155111
```

This will deploy your contracts to:
- Polygon Mainnet (137)
- Mumbai Testnet (80002)
- Polygon Amoy Testnet (80002)
- Sepolia Testnet (11155111)

The deployment process runs locally using the network configurations that were automatically set up during project initialization.

## Deterministic Addresses
Because the AnyFlow CLI uses the Hardhat configuration file, you don't need to specify any additional deployment configurations. The CLI will automatically use the network configurations set up in the `hardhat.config.js` file.

## How to verify smart contracts

To verify your smart contracts on the blockchain, you can use the `--verify` flag. This will verify your contracts on the blockchain after deployment.

```bash
anyflow deploy --networks 137 --verify
```

## How to have the same contract address on all networks

To use deterministic addresses for your contracts, you can use the `--deterministic-addresses` flag. This will generate a deterministic address for your contract on each network.
To have the same contract address on all networks, you can use the `--deterministic-addresses` or `-da` flag. This will generate a deterministic address for your contract on each network.

```bash
anyflow deploy --networks 137 --deterministic-addresses true
anyflow deploy --networks 137 --deterministic-addresses
```

## Fix
## Caveats

### Deployment time

Because we're running the deployment process locally, each network will be deployed sequentially. This means that the deployment process will take longer if you're deploying to multiple networks. If you want a faster deployment process, you [can use the AnyFlow Web UI](../intro.md) to deploy your contracts to multiple networks simultaneously. This will execute the deployment process in parallel, significantly reducing the deployment time for you and your team.

## Fix stuck status

Sometimes the cli you fail to update anyflow on the status of the deployment,
this will create a file that keeps track of the deployment status, you can manually fix the status by running the following command:

```bash
anyflow fix
anyflow deploy fix-status
```
35 changes: 35 additions & 0 deletions docs/anyflow_cli/5_faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_position: 5
---

# AnyFlow CLI FAQ

### How does the CLI work?
The AnyFlow CLI is a command-line tool that allows you to deploy your smart contracts to multiple blockchains with a single command and zero configuration. It merges Hardhat configuration file with the AnyFlow configuration file allowing us to use the AnyFlow API to interact with the blockchain networks and do everything for you.

### What to do if deployments are taking too long?

If you're deploying to multiple networks, the deployment process will take longer because the CLI deploys to each network sequentially. If you want to speed up the deployment process, you can use the [AnyFlow Web UI](../intro.md) to deploy your contracts to multiple networks simultaneously. This will execute the deployment process in parallel, significantly reducing the deployment time for you and your team.

### I see private keys in the anyflow-cli package. Is it safe?

Yes! The private keys are used only to identify accounts, not to sign them. The signing process is done securely in the [RPC proxy](../how_it_works/4_rpc_gateway.md) server, away from the CLI, preventing any private key exposure on your machine. If you want to learn more about how we secure your private keys, you can read our [How AnyFlow Works documentation](../how_it_works/1_private_keys.md).

### What if I want to stop using AnyFlow in my project?

We would be sad to see you go, but you can easily remove AnyFlow from your project by running the `anyflow uninstall` command. We designed all our tools with the developer in mind, so we made sure that you can easily customize your owns configurations and deployments if needed.

### Are my credentials safe?

Yes! The AnyFlow CLI uses encrypts your credentials and stores them locally on your machine.

### How do I reset my credentials?
Run the logout command to clear credentials and re-authenticate.

```bash
anyflow logout
```

## Troubleshooting

If you have any questions or need help, feel free to reach out to us on [Discord](https://discord.gg/aCygGwBWya) or [Twitter/X](https://x.com/anyflow_).
16 changes: 14 additions & 2 deletions docs/anyflow_cli/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
---
sidebar_position: 3
sidebar_position: 4
---

# Anyflow CLI

The Anyflow CLI is a command-line tool for deploying multichain smart contracts.
Welcome to the **AnyFlow CLI Documentation**! The **AnyFlow CLI** is your gateway to seamless smart contract deployments. With just a few commands, you can deploy your projects securely and effortlessly across multiple blockchains.

## Why Use the AnyFlow CLI?

- **Efficiency**: Automate deployments with minimal manual setup.
- **Security**: Built-in authentication and encrypted credentials.
- **Ease of Use**: Simple commands designed to get you started quickly.
- **Multi-Chain Support**: Deploy across multiple blockchains without needing deep infrastructure knowledge.
- **You're a dev**: You love the command line. We do too!

## Installation

Expand All @@ -21,3 +29,7 @@ After installation, you can use the `anyflow` cli in your terminal. To see the a
```bash
anyflow --help
```

## Next steps

- [Getting Started](./1_starting.md): Learn how to deploy your first smart contract with the AnyFlow CLI.
26 changes: 20 additions & 6 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
sidebar_position: 4
sidebar_position: 6
---

# Frequently Asked Questions

### Smart contract deployment is not an issue for me. Why should I use AnyFlow?

Check our [Why AnyFlow?](./1_why.md) page for more information.

### How much does it cost?

AnyFlow is free for testnet deployments. For mainnet deployments, we charge a unified fee in USD based on the gas cost of your deployment and its complexity. You can check the estimated cost before deploying.
Expand All @@ -22,22 +26,32 @@ We strongly recommend you set the contract's owner and other roles in the contra

Though, if the contract is `Ownable` and it's owner is the deployer's account, the platform will call the `transferOwnership` function right after the deployment and transfer the ownership to your account's address. If not set in the configs, AnyFlow will hold it until it is set.

### What RPC providers are being used?
### Which RPC providers are being used?

Currently, the system uses Alchemy, Infura, Ankr, ThirdWeb, and each chain's official public RPCs. We frequently monitor each RPC provider's performance and availability to ensure the best experience for our users.

You can always check the status of the RPC providers on our [chains page](https://anyflow.pro/chains).

### Which block explorers are supported?

Currently only Etherscan.
We support Etherscan and Blockscout for Ethereum-based networks. To change your preferred block explorer, you can update the configuration in your [settings page](https://app.anyflow.pro/settings/block-search).

### How to request a new chain to be added?

Fill this form: [Request a new chain](https://docs.google.com/forms/d/e/1FAIpQLScV-Y69WqbciEtNhWGmzsj_6U2EB9kk4FW2cVRIohv4JrX8SQ/viewform)

### Who owns the private keys used for deployment?

Check our [How AnyFlow Works documentation](./how_it_works/1_private_keys.md) for more information.

### Where are the private keys stored?
### Why is the chain I want to deploy to disabled?

Private keys are stored in the platform's secure vault KMS.
A chain can be disabled if it is experiencing issues, if it is not supported by AnyFlow, or if has no deployer accounts available at the moment.

### What if I do not want the contract to be verified?

There is an option to disable the code verification process in the deployment configuration step.

### Need help?

Just send an email to support@anyflow.pro
If you have any questions or need help, feel free to reach out to us on [Discord](https://discord.gg/aCygGwBWya) or [Twitter/X](https://x.com/anyflow_).
2 changes: 1 addition & 1 deletion docs/how_it_works/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
---

# How AnyFlow Works
Expand Down
Binary file modified docs/img/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/deploy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/environment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/mcp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/repository.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 15 additions & 5 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 2
---

# Getting Started
Expand All @@ -9,6 +9,8 @@ Welcome to AnyFlow, the platform designed to simplify and automate the deploymen
<!-- ## Overview
AnyFlow enables web3 developers to deploy smart contracts across multiple blockchains with ease. Whether you're a solo developer or part of a larger team, AnyFlow provides the tools and workflows to streamline your deployment process. No more RPC configurations, API key management, faucets or chain-specific settings — AnyFlow handles it all for you. -->

If you have any questions or need help, feel free to reach out to us on [Discord](https://discord.gg/aCygGwBWya) or [Twitter/X](https://x.com/anyflow_).
,
## Step 0: Fork our Hello World project

If you do not have a project to deploy, you can fork our Hello World project to get started fast. This Hardhat project contains a simple smart contract that you can deploy to any supported chain to quickly test AnyFlow.
Expand All @@ -21,15 +23,21 @@ Visit the [AnyFlow app](https://app.anyflow.pro/) and authenticate using your Gi

![](./img/login.png)

## Step 2: Select Your Repository
## Step 2: Select Environment

Next, select the account, repository and branch you wish to deploy from. AnyFlow will then automatically detect your project's configuration and dependencies.
Select the environment you want to deploy to.

![](./img/environment.png)

## Step 3: Select Your Repository

Next, select the repository and branch you wish to deploy from. AnyFlow will then automatically detect your project's configuration and dependencies.

If your Hardhat project is not on the repository's root directory, you can specify the path by checking the "custom root directory" option.

![](./img/repository.png)

## Step 3: Configure Your Project
## Step 4: Configure Your Project
Once your repository is connected, configure your deployment:

Select the blockchain networks you wish to deploy to (e.g., Ethereum, Polygon).
Expand All @@ -39,13 +47,15 @@ If you used environment variables in your deployment scripts, you can set them h

![](./img/config.png)

## Step 4: Deploy Your Smart Contracts
## Step 5: Deploy Your Smart Contracts
With your project configured, you're ready to deploy:

Click "Next" to check all deployment configuration and if everything is correct, click "Deploy".
AnyFlow will automatically handle the deployment process, including funding deployer accounts, retrying if anything fails, and managing API keys.
Monitor the deployment status in real-time, and view the results once complete.

![](./img/deploy.png)

## Next Steps
Congratulations on deploying your first smart contracts with AnyFlow!

Expand Down
Loading