-
Notifications
You must be signed in to change notification settings - Fork 9
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
14 changed files
with
165 additions
and
42 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package cmd_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/strangelove-ventures/noble-cctp-relayer/cmd" | ||
"github.com/strangelove-ventures/noble-cctp-relayer/ethereum" | ||
"github.com/strangelove-ventures/noble-cctp-relayer/noble" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestConfig(t *testing.T) { | ||
file, err := cmd.Parse("../config/sample.yaml") | ||
require.NoError(t, err, "Error parsing config") | ||
|
||
// assert noble chainConfig correctly parsed | ||
var nobleType interface{} = file.Chains["noble"] | ||
_, ok := nobleType.(*noble.ChainConfig) | ||
require.True(t, ok) | ||
|
||
// assert ethereum chainConfig correctly parsed | ||
var ethType interface{} = file.Chains["ethereum"] | ||
_, ok = ethType.(*ethereum.ChainConfig) | ||
require.True(t, ok) | ||
} |
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,43 @@ | ||
chains: | ||
ethereum: | ||
chain-id: 5 | ||
rpc: "https://goerli.infura.io/v3/apiKey" | ||
ws: "wss://goerli.infura.io/ws/v3/apiKey" | ||
message-transmitter: "0x26413e8157CD32011E726065a5462e97dD4d03D9" | ||
|
||
start-block: 9737196 | ||
lookback-period: 5 # historical blocks to look back on launch | ||
|
||
broadcast-retries: 5 # number of times to attempt the broadcast | ||
broadcast-retry-interval: 10 # time between retries in seconds | ||
|
||
minter-private-key: "privateKey" | ||
|
||
|
||
noble: | ||
rpc: "https://rpc.testnet.noble.strange.love:443" | ||
chain-id: "grand-1" | ||
|
||
start-block: 0 # set to 0 to default to latest block | ||
lookback-period: 5 # historical blocks to look back on launch | ||
workers: 8 | ||
|
||
tx-memo: "Relayed by Strangelove" | ||
gas-limit: 200000 | ||
broadcast-retries: 5 # number of times to attempt the broadcast | ||
broadcast-retry-interval: 5 # time between retries in seconds | ||
|
||
# hex encoded | ||
minter-private-key: "hexEncodedPrivateKey" | ||
|
||
# source domain id -> destination domain id | ||
enabled-routes: | ||
0: 4 # ethereum to noble | ||
4: 0 # noble to ethereum | ||
|
||
circle: | ||
attestation-base-url: "https://iris-api-sandbox.circle.com/attestations/" | ||
fetch-retries: 0 # additional times to fetch an attestation | ||
fetch-retry-interval: 3 # time between retries in seconds | ||
|
||
processor-worker-count: 16 |
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
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
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
Oops, something went wrong.