-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
619 additions
and
57 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,3 +3,6 @@ | |
# Docker | ||
docker/**/.* | ||
config.json | ||
channel.json | ||
connection.json | ||
info/* |
18 changes: 0 additions & 18 deletions
18
packages/axelar-local-dev-cosmos/docker/axelar/bin/04-register-broadcaster.sh
This file was deleted.
Oops, something went wrong.
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
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
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
packages/axelar-local-dev-cosmos/docker/axelar/bin/libs/evm-rpc.toml
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,24 @@ | ||
[[axelar_bridge_evm]] | ||
name = "Ethereum" | ||
rpc_addr = "localhost:8500/0" | ||
start-with-bridge = false | ||
|
||
[[axelar_bridge_evm]] | ||
name = "Avalanche" | ||
rpc_addr = "localhost:8500/1" | ||
start-with-bridge = false | ||
|
||
[[axelar_bridge_evm]] | ||
name = "Fantom" | ||
rpc_addr = "localhost:8500/2" | ||
start-with-bridge = false | ||
|
||
[[axelar_bridge_evm]] | ||
name = "Moonbeam" | ||
rpc_addr = "localhost:8500/3" | ||
start-with-bridge = false | ||
|
||
[[axelar_bridge_evm]] | ||
name = "Polygon" | ||
rpc_addr = "localhost:8500/4" | ||
start-with-bridge = false |
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
packages/axelar-local-dev-cosmos/docker/axelar/bin/setup.sh
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,13 @@ | ||
#!/bin/sh | ||
|
||
EVM_CHAIN=ethereum | ||
COSMOS_CHAIN=wasm | ||
|
||
# 1. Add EVM chain | ||
sh ./steps/01-add-chain.sh ${EVM_CHAIN} | ||
|
||
# # 2. Add cosmos-based chain | ||
sh ./steps/02-add-cosmos-chain.sh ${COSMOS_CHAIN} | ||
|
||
# # 3. Register Broadcaster Account and Maintainer | ||
# sh ./steps/04-register-broadcaster.sh |
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
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
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
30 changes: 30 additions & 0 deletions
30
packages/axelar-local-dev-cosmos/docker/axelar/bin/steps/04-register-broadcaster.sh
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,30 @@ | ||
|
||
#!/bin/sh | ||
|
||
CHAIN_ID=axelar | ||
HOME=/root/private/.axelar | ||
DEFAULT_KEYS_FLAGS="--keyring-backend test --home ${HOME}" | ||
DIR="$(dirname "$0")" | ||
|
||
# 1. Register broadcaster | ||
echo "Registering broadcaster" | ||
docker exec -it axelar /bin/sh -c "axelard tx snapshot register-proxy \$(axelard keys show gov1 -a ${DEFAULT_KEYS_FLAGS}) \ | ||
--chain-id ${CHAIN_ID} --from owner ${DEFAULT_KEYS_FLAGS} \ | ||
--output json --gas 1000000" | ||
echo "Registered broadcaster" | ||
|
||
# Read the content of the local file and append it to the file inside the Docker container | ||
docker exec -t axelar /bin/sh -c "cat /root/private/bin/libs/evm-rpc.toml >> "$HOME"/config/config.toml" | ||
echo "Added evm-rpc.toml to config.toml" | ||
|
||
# 2. Register broadcaster as a maintainerf | ||
echo "Registering maintainer" | ||
docker exec -it axelar /bin/sh -c "axelard tx nexus register-chain-maintainer avalanche ethereum fantom moonbeam polygon \ | ||
--chain-id ${CHAIN_ID} --from gov1 ${DEFAULT_KEYS_FLAGS} \ | ||
--output json --gas 1000000" | ||
|
||
echo "Registered maintainer" | ||
|
||
|
||
|
||
|
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
"prettier": "prettier --write 'src/**/*.ts'", | ||
"build": "npm run clean && npm run build-ts", | ||
"build-ts": "tsc", | ||
"start": "ts-node scripts/start.ts", | ||
"start": "./scripts/clean.sh && ts-node scripts/start.ts", | ||
"stop": "ts-node scripts/stop.ts" | ||
}, | ||
"dependencies": { | ||
|
@@ -23,6 +23,7 @@ | |
"@cosmjs/cosmwasm-stargate": "^0.31.1", | ||
"@cosmjs/stargate": "^0.31.1", | ||
"@types/sinon": "^10.0.20", | ||
"reconnecting-websocket": "^4.4.0", | ||
"sinon": "^17.0.0" | ||
}, | ||
"author": "[email protected]", | ||
|
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,7 @@ | ||
#!/bin/bash | ||
|
||
# Get the directory of the current script | ||
DIR="$(dirname "$0")" | ||
|
||
# Remove the directory relative to the script's location | ||
rm -rf "$DIR/../info" |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import { startAll } from "../src/docker"; | ||
const path = require("path"); | ||
import childProcess from "child_process"; | ||
// clean up info json | ||
|
||
startAll(); |
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
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
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
12 changes: 12 additions & 0 deletions
12
packages/axelar-local-dev-cosmos/src/clients/CosmosRelayerClient.ts
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,12 @@ | ||
import ReconnectingWebSocket from "reconnecting-websocket"; | ||
import { CosmosChainInfo } from "../types"; | ||
|
||
export class CosmosRelayerClient { | ||
private wsMap: Map<string, ReconnectingWebSocket>; | ||
|
||
private constructor(config: Omit<CosmosChainInfo, "owner">) { | ||
this.wsMap = new Map(); | ||
} | ||
|
||
async listenIncomingIBCEvents() {} | ||
} |
Oops, something went wrong.