Skip to content

Commit

Permalink
feat: Any rpc (#254)
Browse files Browse the repository at this point in the history
* change to any rpc url

* remove test function

* remove test file

* remove space

* change suggested stake size

(cherry picked from commit 41bbd2c)
  • Loading branch information
0xSpuddy authored and github-actions[bot] committed Aug 6, 2024
1 parent 201858a commit 72b071f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions daemons/token_bridge_feed/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ func (c *Client) QueryAPI(urlStr string) ([]byte, error) {
}

func (c *Client) InitializeDeposits() error {
ethApiKey, err := c.getEthApiKey()
ethRpcUrl, err := c.getEthRpcUrl()
if err != nil {
return fmt.Errorf("failed to get ETH API key: %w", err)
return fmt.Errorf("failed to get ETH RPC url: %w", err)
}
eclient, err := ethclient.Dial("wss://eth-sepolia.g.alchemy.com/v2/" + ethApiKey)
eclient, err := ethclient.Dial(ethRpcUrl)
if err != nil {
return fmt.Errorf("failed to connect to the Ethereum client: %w", err)
}
Expand Down Expand Up @@ -343,17 +343,17 @@ func (c *Client) EncodeReportValue(depositReceipt DepositReceipt) ([]byte, error
return reportValueArgsEncoded, nil
}

func (c *Client) getEthApiKey() (string, error) {
func (c *Client) getEthRpcUrl() (string, error) {
viper.SetConfigName("secrets")
viper.SetConfigType("yaml")
viper.AddConfigPath(".")
err := viper.ReadInConfig()
if err != nil {
panic(fmt.Errorf("fatal error config file: %w", err))
}
ethApiKey := viper.GetString("eth_api_key")
if ethApiKey == "" {
return "", fmt.Errorf("eth_api_key not set")
ethRpcUrl := viper.GetString("eth_rpc_url")
if ethRpcUrl == "" {
return "", fmt.Errorf("eth_rpc_url not set")
}
return ethApiKey, nil
return ethRpcUrl, nil
}
4 changes: 2 additions & 2 deletions evm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Create a `secrets.yaml` file in the root layer directory:
```
touch secrets.yaml
```
And set your alchemy eth-mainnet key:
And set your eth-mainnet rpc url:
```yaml
eth_api_key: "your-alchemy-eth-mainnet-key"
eth_rpc_url: "your-eth-mainnet-rpc-url"
```
To run the start scripts for the layer chain, you need `jq` installed. For MacOS, you can install it with
Expand Down
2 changes: 1 addition & 1 deletion validator.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"c+EuycPpudgiyVl6guYG9oyPSImHHJz1z0Pg4ODKveo="},
"amount": "100000000000loya",
"amount": "99000000loya",
"moniker": "calebmoniker",
"identity": "optional identity signature (ex. UPort or Keybase)",
"website": "validator's (optional) website",
Expand Down

0 comments on commit 72b071f

Please sign in to comment.