-
Notifications
You must be signed in to change notification settings - Fork 25
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 2 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,89 @@ | ||
# 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 Gateway Contract. | ||
[Gateway Documentation](../doc/src/contracts/gateway.md) | ||
|
||
**Voting Verifier** | ||
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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 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 will need to support the chain and vote on the truth of source chain transactions. | ||
|
||
[Voting Verifier Documentation](../doc/src/contracts/voting_verifier.md) | ||
|
||
**Multisig Prover** | ||
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The prover contract is responsible for transforming gateway messages into a payload that is ready to be sent to the destination gateway. | ||
|
||
[Multisig Prover Documentation](../doc/src/contracts/multisig_prover.md) | ||
|
||
|
||
### ampd | ||
|
||
Ampd is the off chain daemon responsible for voting and signing within the amplifier protocol. The daemon 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 | ||
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
### 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 let us know by filing a Github issue to this repository to create a pull request to be merged. | ||
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**Coordinator** | ||
|
||
Manages coordination between contracts in the Amplifier system. [Coordinator Documentation](../doc/src/contracts/coordinator.md) | ||
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**Multisig** | ||
|
||
Facilitates verifier signing sessions that is leveraged by the multisig prover contract. The Multisig contract currently supports ECDSA and ED25519 signature schemes. [Multisig Documentation](../doc/src/contracts/multisig.md) | ||
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**Rewards** | ||
|
||
Manages verifier rewards. [Rewards Documentation](../doc/src/contracts/rewards.md) | ||
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**Router** | ||
|
||
Routes messages between gateway contracts connected in the Amplifier ecosystem, and responsible for performing various administrative functions for chain. [Router Documentation](../doc/src/contracts/router.md) | ||
|
||
**Service Registry** | ||
|
||
Registers and tracks the pool of verifiers that support each and every Amplifier chain. [Service Registry Documentation](../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, you will have to fork this repository and create a pull request to merge into the main repository. | ||
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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 | ||
|
||
If your verifier contract is a voting verifier, the chain must be supported by a verifier set. Testnet/mainnet has a global set of ~30 verifiers that will need to support your chain. | ||
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
To facilitate verifier onboarding to support your chain, please follow the guide laid out in [this page - link TBD](). | ||
|
||
### 4. Fund rewards pools | ||
|
||
Create rewards pools for your verifier and multisig prover contracts. These rewards pools incentivize verifiers to support your chain. Instructions on how to create and fund rewards pools can be found [here](https://docs.axelar.dev/dev/amplifier/add-rewards). | ||
canhtrinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Testing | ||
|
||
## Deployment |
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?