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
7 changes: 7 additions & 0 deletions typescript/.changeset/neat-emus-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@coinbase/agentkit": minor
---

Added AcrossActionProvider to allow bridging tokens using the Across protocol
- `bridge_token` action to bridge native and ERC20 tokens
- `check_deposit_status` action to check the status of bridge deposits
13 changes: 13 additions & 0 deletions typescript/agentkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ const agent = createReactAgent({

## Action Providers
<details>
<summary><strong>Across</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>bridge_token</code></td>
<td width="768">Bridges tokens between supported chains using Across Protocol.</td>
</tr>
<tr>
<td width="200"><code>check_deposit_status</code></td>
<td width="768">Checks the status of a cross-chain bridge deposit on the Across Protocol (mainnet networks only).</td>
</tr>
</table>
</details>
<details>
<summary><strong>Basename</strong></summary>
<table width="100%">
<tr>
Expand Down
1 change: 1 addition & 0 deletions typescript/agentkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"typescript"
],
"dependencies": {
"@across-protocol/app-sdk": "^0.2.0",
"@alloralabs/allora-sdk": "^0.1.0",
"@coinbase/coinbase-sdk": "^0.20.0",
"@jup-ag/api": "^6.0.39",
Expand Down
51 changes: 51 additions & 0 deletions typescript/agentkit/src/action-providers/across/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Across Action Provider

This directory contains the **AcrossActionProvider** implementation, which provides actions to interact with the **Across Protocol** for bridging tokens across multiple EVM chains.

## Directory Structure

```
across/
├── acrossActionProvider.ts # Main provider with Across Protocol functionality
├── acrossActionProvider.test.ts # Tests
├── schemas.ts # Bridge token schema
├── utils.ts # Utility functions for Across integration
├── index.ts # Main exports
└── README.md # This file
```

## Actions

- `bridge_token`: Bridge tokens from one chain to another using the Across Protocol
- `check_deposit_status`: Check the status of a cross-chain bridge deposit on the Across Protocol

## Adding New Actions

To add new Across actions:

1. Define your action schema in `schemas.ts`
2. Implement the action in `acrossActionProvider.ts`
3. Add tests in `acrossActionProvider.test.ts`

## Network Support

The Across provider supports cross-chain transfers between EVM-compatible chains, for example:
- Ethereum Mainnet to Base Mainnet
- Base Sepolia to Ethereum Sepolia
The status of bridge deposit can only be checked on Mainnets.

## ⚠️ Warning

Before briding funds, always make sure that you have access to the destination address on the destination chain!

Note that when using a CDP server wallet with CdpWalletProvider, a new wallet address is generated for each chain. This means that if you bridge tokens to the sender's address on one chain, you may not be able to access those funds on the destination chain within AgentKit since a different wallet address will be used.
While you can export the private key to access funds in external wallets, it's recommended to either use ViemWalletProvider for consistent addresses across chains or ensure the destination address is different from the sender's address.

## Configuration

The provider requires the following configuration:
- `privateKey`: Private key of the wallet provider

## Notes

For more information on the **Across Protocol**, visit [Across Protocol Documentation](https://docs.across.to/).
Loading