-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: integration docs #642
Open
canhtrinh
wants to merge
9
commits into
main
Choose a base branch
from
feat/integration-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c58d1e5
chore: adding skeleton for integration.md file
canhtrinh 640caa9
feat: refactored version of integration doc
canhtrinh 52c915d
Update doc/INTEGRATION.md
canhtrinh 61f7be9
Update doc/INTEGRATION.md
canhtrinh c21f453
Merge branch 'main' into feat/integration-docs
canhtrinh fdac835
feat: addressing latest PR comments
canhtrinh 11ad711
chore: minor formatting on integration docs
canhtrinh f4aca1c
Merge branch 'main' into feat/integration-docs
canhtrinh 1fcf5bc
Merge branch 'main' into feat/integration-docs
milapsheth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Axelar Amplifier Integration Guide | ||
|
||
This document provides an overview of the contracts on Axelar Amplifier protocol and outlines the steps required to integrate a chain. The document only covers the Amplifier contracts; a comprehensive list on other required components for the integration of a chain into Amplifier can be found in the [Axelar Amplifier Public Docs](https://docs.axelar.dev/dev/amplifier/chain-integration/introduction/). | ||
|
||
--- | ||
|
||
## Amplifier Contracts Overview | ||
|
||
To connect your chain to the Axelar network via the Interchain Amplifier, you will need to deploy or configure the following three contracts on Amplifier, and the configuration of `ampd`, as outlined below: | ||
|
||
### Chain-Specific Amplifier Contracts | ||
|
||
**Gateway** | ||
|
||
A contract on Amplifier that will forward incoming messages to the chain's correspoding verifier contract to check the validity of a transaction and forwards verified transactions onto the Amplifier router. It also receives messages from other chains to be processed by the multisig prover. | ||
Most integrators will begin by using or customizing [this](../contracts/gateway/) Gateway Contract. | ||
|
||
[Gateway Documentation](../doc/src/contracts/gateway.md) | ||
|
||
**Verifier** | ||
|
||
A contract on Amplifier protocol that verifies the validity of transactions on your chain. Most integrators will begin by using or customizing a Voting Verifier (such as [this](../contracts/voting-verifier/) one) or can be customized to your needs for cases such as verification via ZK Proof. | ||
|
||
A Voting Verifier must be supported by a Verifier Set that will need to support the chain and vote on the truth of source chain transactions. | ||
|
||
[Voting Verifier Documentation](../doc/src/contracts/voting_verifier.md) | ||
|
||
**Prover** | ||
|
||
The prover contract is responsible for transforming gateway messages into a payload that is ready to be sent to the destination gateway. Most integrators will begin by using or customizing a multisig prover, such as [this](../contracts/multisig-prover/) one. | ||
|
||
[Multisig Prover Documentation](../doc/src/contracts/multisig_prover.md) | ||
|
||
|
||
### ampd | ||
|
||
Ampd is the off chain daemon that listens to the Axelar blockchain for specific events, connects to external blockchains via JSON-RPC, and uses [tofnd](https://github.com/axelarnetwork/tofnd) for signing transactions and batches of messages | ||
|
||
|
||
### Infrastructure Contracts | ||
|
||
These core contracts manage essential infrastructure logic for the protocol and typically do not require modification. If your chain does require the modificaiton of any of these contracts, please either file a Github issue or create a pull request with the requested changes to accommodate your chain. | ||
|
||
There is only one instance of each of these contracts in the protocol; any changes to these contracts must go through an upgrade of the contracts that via Axelar governance. | ||
|
||
A description of each infrastructure contract can be found as follows: | ||
* [Coordinator](../doc/src/contracts/coordinator.md) | ||
* [Multisig](../doc/src/contracts/multisig.md) | ||
* [Rewards](../doc/src/contracts/rewards.md) | ||
* [Router](../doc/src/contracts/router.md) | ||
* [Service Registry](../doc/src/contracts/service_registry.md) | ||
|
||
## Integration Steps | ||
|
||
### 1. Deploy and instantiate the chain-specific contracts | ||
|
||
The very first step is to deploy and instantiate the chain-specific contracts. This repository has reference contracts for each: [**Gateway**](../contracts/gateway), [**Voting Verifier**](../contracts/voting-verifier), and [**Multisig Prover**](../contracts/multisig-prover), and these reference contracts have been used in many of the initial chains live on Amplifier today. | ||
|
||
However, it is up to the integrator to determine how to best utilize the reference contracts, whether that may be by using the reference contracts we expose as is, maintaining a fork, or something else. It is important to note that these reference contracts are under active development and may change at any time, so integrators should be aware of the specific implementation and version of any reference contracts should they decide to use them. | ||
|
||
### 2. Configure `ampd` | ||
|
||
If your chain is **not EVM-compatible**, you will need to implement an **ampd** module that Amplifier can use to communicate with your chain. Using the [ampd EVM module](../ampd/src/evm) as a design template. | ||
|
||
NOTE: any modifications you make to `ampd` to support your chain will need to be upstreamed and merged back into the main repository. | ||
|
||
If your chain is **EVM-compatible**, you can use the existing **ampd** module for EVM chains: [ampd EVM module](../ampd/src/evm), and there is nothing to do from your side. | ||
|
||
### 3. Configure a verifier set | ||
|
||
The chain must be supported by a verifier set. Testnet and mainnet will have an initial set of ~30 verifiers globally that can support your chain. | ||
|
||
### 4. Fund rewards pools | ||
|
||
Create rewards pools for your verifier and multisig prover contracts. These rewards pools incentivize verifiers to support your chain. Please refer to the [rewards contract](../contracts/rewards/src/) for more info. | ||
|
||
## Testing and Deployment | ||
|
||
Once your contracts are deployed, you can test them, along with the external smart contracts deployed to your chain, on the public devnet. Please refer to the public [developer documentation](https://docs.axelar.dev/dev/amplifier/chain-integration/integrate-a-chain/) for the latest information on the public devnet and example deployment scripts to get you started. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is the proper placement for the file. @eguajardo where should this be placed so it renders correctly in the mdbook?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file must be inside
doc/src
folder and it should be referenced in theSUMMARY.md
so it can be properly indexed. You can test it by running: