You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This section contains the contract Addresses of the Abacus core platform. We recommend developers to use Abacus' SDKs which bundle these addresses via [Environments](../developers/environments.md).
3
+
This section contains the contract Addresses of the Abacus core platform. We recommend developers to use Abacus' SDKs which bundle these addresses via [Environments](../developers/environments/).
Copy file name to clipboardexpand all lines: developers/advanced/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -6,4 +6,4 @@ description: Digging deeper into interchain application development
6
6
7
7
Now that you've gotten the feel for building a simple interchain application, it's time to start exploring some more advanced concepts.
8
8
9
-
This section covers some library contracts that you might find helpful, the [Router pattern](router.sol.md) for building interchain apps, different approaches to [message encoding](message-encoding.md) and decoding, and more.
9
+
This section covers some library contracts that you might find helpful, the [Router pattern](router-pattern.md) for building interchain apps, different approaches to [message encoding](message-encoding.md) and decoding, and more.
Copy file name to clipboardexpand all lines: developers/advanced/connection-client.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
description: The easiest way to connect your application to Abacus
3
3
---
4
4
5
-
# AbacusConnectionClient.sol
5
+
# Connection Client
6
6
7
7
To send and receive interchain messages, your application will need to be aware of the Abacus contract addresses. Inheriting from [`AbacusConnectionClient`](https://github.com/abacus-network/abacus-monorepo/blob/main/solidity/app/contracts/AbacusConnectionClient.sol) is the easiest way to manage these pointers.
8
8
9
-
## AbacusConnectionManager
9
+
## Abacus Connection Manager
10
10
11
11
Before diving into `AbacusConnectionClient`, first let's zoom out, and take a look at [`AbacusConnectionManager`](https://github.com/abacus-network/abacus-monorepo/blob/main/solidity/core/contracts/AbacusConnectionManager.sol), an out-of-the-box solution for managing Abacus contract addresses.
12
12
@@ -22,7 +22,7 @@ Over time, we expect a number of incremental improvements to the Abacus protocol
22
22
23
23
Using an `AbacusConnectionManager` allows applications to migrate to a new Abacus deployment with just a few transactions.
24
24
25
-
## AbacusConnectionClient
25
+
## Abacus Connection Client
26
26
27
27
``[`AbacusConnectionClient`](https://github.com/abacus-network/abacus-monorepo/blob/main/solidity/app/contracts/AbacusConnectionClient.sol) is a simple mix-in contract that application developers can inherit from in order to connect to Abacus.
Copy file name to clipboardexpand all lines: developers/advanced/gas.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -30,11 +30,11 @@ The contract has a single payable function, which takes a message leaf index (wh
30
30
function payGasFor(uint256 _leafIndex) external payable;
31
31
```
32
32
33
-
Developers can specify the address of the `InterchainGasPaymaster` that they're using via their [`AbacusConnectionManager`](abacusconnectionclient.sol.md#abacusconnectionmanager). For convenience, Abacus Works will operate a processor and relayer, and deploy corresponding `AbacusConnectionManager` and `InterchainGasPaymasters` that application developers can point to if they choose.
33
+
Developers can specify the address of the `InterchainGasPaymaster` that they're using via their [`AbacusConnectionManager`](connection-client.md#abacusconnectionmanager). For convenience, Abacus Works will operate a processor and relayer, and deploy corresponding `AbacusConnectionManager` and `InterchainGasPaymasters` that application developers can point to if they choose.
34
34
35
35
## Checkpoints
36
36
37
-
Because an application will often want to checkpoint and/or pay for gas while dispatching a message, convenience functions are provided in [Router.sol](router.sol.md). The following table shows each of these convenience functions and what they do.
37
+
Because an application will often want to checkpoint and/or pay for gas while dispatching a message, convenience functions are provided in [Router.sol](router-pattern.md). The following table shows each of these convenience functions and what they do.
38
38
39
39
| Function | Interchain gas payment? | Creates a checkpoint? |
@@ -53,9 +53,9 @@ Applications can use the `InterchainGasCalculator` in the Abacus SDK to estimate
53
53
54
54
### Smart Contract
55
55
56
-
Adapting the simple example from the [Getting started](../getting-started/write-your-contracts.md) section, let's have our `HelloWorld` application dispatch a message, pay interchain gas for that message, and create a checkpoint. Note the `HelloWorld` contract now inherits from [Router.sol](router.sol.md).
56
+
Adapting the simple example from the [Getting started](../contracts-sdk/write-your-contracts.md) section, let's have our `HelloWorld` application dispatch a message, pay interchain gas for that message, and create a checkpoint. Note the `HelloWorld` contract now inherits from [Router.sol](router-pattern.md).
57
57
58
-
We will use the internal function `_dispatchWithGasAndCheckpoint`, which is implemented in [`Router.sol`](router.sol.md). It will first dispatch a message to a remote router, then pay a specified amount of origin chain native tokens to the `InterchainGasPaymaster` contract that's been set in the `AbacusConnectionManager`, and then create a checkpoint on the `Outbox`. No special handling logic, apart from simply implementing the `handle()` function, is required.
58
+
We will use the internal function `_dispatchWithGasAndCheckpoint`, which is implemented in [`Router.sol`](router-pattern.md). It will first dispatch a message to a remote router, then pay a specified amount of origin chain native tokens to the `InterchainGasPaymaster` contract that's been set in the `AbacusConnectionManager`, and then create a checkpoint on the `Outbox`. No special handling logic, apart from simply implementing the `handle()` function, is required.
59
59
60
60
```solidity
61
61
import {Router} from "@abacus-network/app/contracts/Router.sol";
Copy file name to clipboardexpand all lines: developers/advanced/router-pattern.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
description: A pattern for building interchain applications
3
3
---
4
4
5
-
# Routers
5
+
# Router Pattern
6
6
7
-
While patterns and best practices will evolve over time, the `Router` pattern has emerged as an early model for building interchain applications.
7
+
While patterns and best practices will evolve over time, the Router pattern has emerged as a useful model for building interchain applications.
8
8
9
-
Developers can build applications following this pattern by inheriting from the `Router` mix-in contract, and implementing functions that send and receive messages to and from remote chains.
9
+
The Router pattern allows developers to write application logic once while deploying it to many networks. Developers can leverage this pattern by inheriting from the [`Router.sol` mix-in contract](https://github.com/abacus-network/abacus-monorepo/blob/main/solidity/app/contracts/Router.sol), and implementing functions that send and receive messages to and from remote chains.
10
10
11
11
Developers then deploy their contracts on each chain that they would like their application to support. Each contract must be made aware of their counterparts on all remote chains so that they can authenticate the messages that they send between each other.
description: Manage multi-chain applications using the Abacus SDK
3
+
---
4
+
5
+
# Application SDK
6
+
7
+
The Abacus Application SDK help developers manage multichain Abacus applications. This requires a higher level API than dApp developers are familiar with which is namespaced by target network. It is composed of 2 main packages: tooling for multichain deployments and an interaction API.
8
+
9
+
### [Deployment Tooling](deployment-tooling.md)
10
+
11
+
The `@abacus-network/deploy` package facilitates configuration and deployment of Abacus applications. This includes utilities for bytecode verification, working with various proxy contracts patterns, and sanity checking deployments for consistency across chains.
The `AbacusApp` abstraction exported in the `@abacus-network/sdk` package manages collections of contract interfaces on each network. This can be extended and instantiated with artifacts generated by the deployment tooling.
The `MultiProvider` exported in the `@abacus-network/sdk` package abstracts away node interaction for supported Abacus networks. This includes utilities for transaction signing and estimating the gas costs of processing dispatched messages to remote chains. 
description: Deploy your application on multiple chains
3
+
---
4
+
5
+
# Deployment Tooling
6
+
7
+
The Abacus deployment tooling simplifies the deployment of Abacus smart contract applications to configured target networks.
8
+
9
+
### Install
10
+
11
+
```shell
12
+
yarn add @abacus-network/deploy
13
+
```
14
+
15
+
### Implement
16
+
17
+
To leverage the `AbacusAppDeployer` abstraction, developers must provide an implementation for `deployContracts` which describes the logic for deploying the application on a single network. 
function deployContracts(network:Networks, config:MyConfig) {
26
+
// deploy contracts here
27
+
}
28
+
}
29
+
```
30
+
31
+
There are `deployContract` and `deployProxiedContract` helper functions included in `AbacusAppDeployer` which can simplify the `deployContracts` implementation. 
Please see the [Examples section](../examples/) for an implementation of the `AbacusAppDeployer` abstraction`.`
39
+
{% endhint %}
40
+
41
+
### Deploy
42
+
43
+
Once a single network's implementation is specified, a deployer can be instantiated with a [multiprovider.md](../environments/multiprovider.md"mention") and corresponding config. The subsequent `deploy()` invocation will perform deployment for all networks specified in the configuration.
Persisting deployment artifacts will be very important for future use of your application. This goes beyond just addresses and includes compiler options and constructor arguments.
54
+
{% endhint %}
55
+
56
+
There is a `writeOutput` helper function included in `AbacusAppDeployer` that will assist in writing these artifacts to disk. 
Copy file name to clipboardexpand all lines: developers/contracts-sdk/write-your-contracts.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The first step in building an interchain application is writing your smart contr
10
10
11
11
Developers can send messages to other chains by calling the `dispatch()` function on the [`Outbox`](../../protocol/messaging/outbox.md) smart contract.
12
12
13
-
Note that we inherit from [`AbacusConnectionClient`](../advanced/abacusconnectionclient.sol.md), a simple contract that helps us keep track of the Abacus [`Inbox`](../../protocol/messaging/inbox.md) and [`Outbox`](../../protocol/messaging/outbox.md) contracts on our local chain.
13
+
Note that we inherit from [`AbacusConnectionClient`](../advanced/connection-client.md), a simple contract that helps us keep track of the Abacus [`Inbox`](../../protocol/messaging/inbox.md) and [`Outbox`](../../protocol/messaging/outbox.md) contracts on our local chain.
14
14
15
15
```solidity
16
16
import {AbacusConnectionClient} from "@abacus-network/app/contracts/AbacusConnectionClient.sol";
@@ -63,9 +63,9 @@ contract HelloWorld is AbacusConnectionClient {
63
63
64
64
## Try it yourself!
65
65
66
-
To get started writing your contracts, simply install [@abacus-network/app](https://www.npmjs.com/package/@abacus-network/app) and inherit from [`AbacusConnectionClient`](../advanced/abacusconnectionclient.sol.md).
66
+
To get started writing your contracts, simply install [@abacus-network/app](https://www.npmjs.com/package/@abacus-network/app) and inherit from [`AbacusConnectionClient`](../advanced/connection-client.md).
67
67
68
68
You can also use the [template repo](https://github.com/abacus-network/abacus-app-template), which has everything you need to write, test, deploy, and interact with, your first interchain application.
69
69
70
-
Looking to build something a bit more complex? Consider taking a look at the [Router pattern](../advanced/router.sol.md) for interchain applications.
70
+
Looking to build something a bit more complex? Consider taking a look at the [Router pattern](../advanced/router-pattern.md) for interchain applications.
description: Interact with your application on multiple chains
3
+
---
4
+
5
+
# Interaction API
6
+
7
+
The Abacus Interaction API simplifies the interface for smart contract applications deployed across multiple networks. It provides a Typescript interface for invoking an application's smart contract methods on a target network, leveraging the [`MultiProvider`](multiprovider.md) for node API interaction. 
8
+
9
+
### Install
10
+
11
+
```shell
12
+
yarn add @abacus-network/sdk
13
+
```
14
+
15
+
### Implement
16
+
17
+
The `AbacusApp` abstraction is a mapping that resolves a network namespace to a collection of [ethers Contract](https://docs.ethers.io/v5/api/contract/contract/#Contract) instances on that network. A default implementation of this collection called [`AbacusContracts`](https://github.com/abacus-network/abacus-monorepo/blob/main/typescript/sdk/src/contracts.ts#L37) is provided which should satisfy most conceivable designs. This implementation ensures your contracts collections are attached to the appropriate network providers.
18
+
19
+
{% hint style="info" %}
20
+
Please see the [Examples section](../examples/) for a demonstration of how to leverage the `AbacusApp` abstraction`.`
21
+
{% endhint %}
22
+
23
+
### Interact
24
+
25
+
Once an `AbacusApp` implementation is defined, it can be instantiated using the output generated from the [`AbacusAppDeployer`](../application-sdk/deployment-tooling.md) and an instance of the [`MultiProvider`](multiprovider.md). 
26
+
27
+
```typescript
28
+
import { addresses } from'./deployOutput';
29
+
const myApp =newMyApp(addresses, multiProvider);
30
+
```
31
+
32
+
{% hint style="warning" %}
33
+
It is currently not possible to provide a set of networks in the `MultiProvider` which is only a subset of networks in the `addresses` constructor argument. This behavior is being fixed in a future release.
34
+
{% endhint %}
35
+
36
+
To interact with contracts on a particular network, simply provide the namespace to the app. 
description: Manage node providers for Abacus supported networks in one plac
3
+
---
4
+
5
+
# MultiProvider
6
+
7
+
 `MultiProvider` is a network utility used throughout the Abacus Application SDK. In essence, it is a mapping that resolves a network namespace to a configured node provider.
8
+
9
+
### Configuration
10
+
11
+
It has a simple interface for configuring target networks that are supported by the Abacus core protocol.
`MultiProvider` allows, for example, an application to have static node provisioning per target network and register a user's signer for the duration of a session.
For use in hardhat tests, we can provide the hardhat `signer` to multiple test networks to emulate a multichain system locally. The networks shown (`test1`, `test2`, `test3`) are included for convenience.
Copy file name to clipboardexpand all lines: developers/getting-started.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -10,21 +10,21 @@ _**Looking for a tutorial?**_** ** Keep reading for a step-by-step walkthrough o
10
10
11
11
_**Ready to dive in?**_ Use the [template repo](https://github.com/abacus-network/abacus-app-template) to quickly get started with everything you need 
12
12
13
-
_**Not sure what to build?**_ Take a look at some [example applications](../examples/) to see what you can do
13
+
_**Not sure what to build?**_ Take a look at some [example applications](examples/) to see what you can do
14
14
15
15
_**Have questions?**_ We'd love to answer them! Ask us on [discord](https://discord.com/invite/KBD3aD78Bb), reach out on [twitter](https://twitter.com/Abacus\_Network), or ping us on Telegram
16
16
17
17
## Building with Abacus
18
18
19
19
Abacus aims to be the simplest platform for building interchain applications, i.e. applications that send and receive messages to and from multiple blockchains.
20
20
21
-
Abacus provides a simple API for interchain communication that application developers can integrate. In the end, building an interchain application is as simple as writing a smart contract that sends messages to an Abacus [`Outbox`](../../protocol/messaging/outbox.md) and receives messages from an Abacus [`Inbox`](../../protocol/messaging/inbox.md).
21
+
Abacus provides a simple API for interchain communication that application developers can integrate. In the end, building an interchain application is as simple as writing a smart contract that sends messages to an Abacus [`Outbox`](../protocol/messaging/outbox.md) and receives messages from an Abacus [`Inbox`](../protocol/messaging/inbox.md).
22
22
23
23
In addition to this API, Abacus provides a suite of developer tools, including:
24
24
25
25
* A [template repo](https://github.com/abacus-network/abacus-app-template) with everything you need to get started
26
-
* A [mix-in smart contract](../advanced/abacusconnectionclient.sol.md) that your application can inherit from
26
+
* A [mix-in smart contract](advanced/connection-client.md) that your application can inherit from
27
27
* A [hardhat plugin](https://www.npmjs.com/package/@abacus-network/hardhat) for unit testing interchain applications
28
-
*[An SDK](build-your-sdk.md) for interacting with multiple blockchains
0 commit comments