Skip to content

Commit

Permalink
resolve chainID from core lib by blockchain & network
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Nov 19, 2024
1 parent 1b5aa53 commit 0290ee8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
run: |
echo -e "polygon:" > resolvers.settings.yaml
echo -e " amoy:" >> resolvers.settings.yaml
echo -e " chainID: 80002" >> resolvers.settings.yaml
echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_POLYGON_AMOY }}" >> resolvers.settings.yaml
echo -e " networkURL: ${{ secrets.POLYGON_AMOY_NODE_URL }}" >> resolvers.settings.yaml
Expand Down
3 changes: 1 addition & 2 deletions cmd/driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"log"
"net/http"
"os"
"strconv"
"time"

"github.com/ethereum/go-ethereum/common"
Expand Down Expand Up @@ -92,7 +91,7 @@ func initResolvers() (*services.ResolverRegistry, *revocationReolver.OnChainReso
if err != nil {
log.Fatalf("failed configure resolver for network '%s': %v", prefix, err)
}
chainID, err := strconv.ParseInt(networkSettings.ChainID, 10, 32)
chainID, err := core.GetChainID(core.Blockchain(chainName), core.NetworkID(networkName))
if err != nil {
log.Fatalf("failed configure resolver for network '%s': %v", prefix, err)
}
Expand Down
1 change: 0 additions & 1 deletion pkg/app/configs/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const defaultPathToResolverSettings = "./resolvers.settings.yaml"
type ResolverSettings map[string]map[string]struct {
ContractAddress string `yaml:"contractAddress"`
NetworkURL string `yaml:"networkURL"`
ChainID string `yaml:"chainID"`
}

// Config structure represent yaml config for did driver.
Expand Down
2 changes: 0 additions & 2 deletions resolvers.settings.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
iden3:
amoy:
chainID: 80002
contractAddress: 0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124
networkURL: https://polygon-amoy.g.alchemy.com/v2/nQxE0N6UyGmmiurh735CVn4hZVLkTu0v
main:
chainID: 137
contractAddress: 0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D
networkURL: https://polygon-mainnet.g.alchemy.com/v2/4RsuBJrPQLIInqj6-PH5b4NQa3nIZUxa

0 comments on commit 0290ee8

Please sign in to comment.