From add9c9134b4f4eac78e48a9e758fb8d5414bb4a8 Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Tue, 21 May 2024 15:08:08 +0800 Subject: [PATCH] fixes: minor to docs and tests --- .github/workflows/test.yaml | 4 ++-- README.md | 3 ++- balances_scanner_e2e_test.go | 2 +- grassroots_e2e_test.go | 4 ++-- provider_test.go | 2 +- simulate_test_e2e.go | 3 ++- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d500a1e..417239b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.22 + go-version: 1.22.3 - uses: actions/checkout@v2 - name: go test - run: go test -v -race -covermode atomic -coverprofile=covprofile . + run: go test -v -covermode atomic -coverprofile=covprofile . diff --git a/README.md b/README.md index fe6b480..5938221 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # ethutils [![Go test](https://github.com/grassrootseconomics/ethutils/actions/workflows/test.yaml/badge.svg)](https://github.com/grassrootseconomics/ethutils/actions/workflows/test.yaml) +![GitHub Tag](https://img.shields.io/github/v/tag/grassrootseconomics/ethutils) [![Go Reference](https://pkg.go.dev/badge/github.com/grassrootseconomics/ethutils.svg)](https://pkg.go.dev/github.com/grassrootseconomics/ethutils) @@ -12,7 +13,7 @@ Features: * Gas transfers * Smart contract interactions * Address conversion/parsing utilities -* Grassroots Ecomonics [address](https://software.grassecon.org/addresses) loaders +* Grassroots Economics [address](https://software.grassecon.org/addresses) loaders * Dump reverted tx reason * Batch balances scanner diff --git a/balances_scanner_e2e_test.go b/balances_scanner_e2e_test.go index f157ad6..750e897 100644 --- a/balances_scanner_e2e_test.go +++ b/balances_scanner_e2e_test.go @@ -9,7 +9,7 @@ import ( ) func TestProvider_TokensBalance(t *testing.T) { - p := NewProvider("https://api.tatum.io/v3/blockchain/node/celo-mainnet", CeloMainnet) + p := NewProvider("https://forno.celo.org", CeloMainnet) tokens := []common.Address{ w3.A("0x02cc0715E844a45bA56Ad391D92DCd6537315177"), diff --git a/grassroots_e2e_test.go b/grassroots_e2e_test.go index 744c86c..2a6e48b 100644 --- a/grassroots_e2e_test.go +++ b/grassroots_e2e_test.go @@ -6,7 +6,7 @@ import ( ) func TestGrassroots_RegistryMap(t *testing.T) { - p := NewProvider("https://api.tatum.io/v3/blockchain/node/celo-mainnet", CeloMainnet) + p := NewProvider("https://forno.celo.org", CeloMainnet) rMap, err := p.RegistryMap(context.Background(), SarafuNetworkRegistry) if err != nil { @@ -16,7 +16,7 @@ func TestGrassroots_RegistryMap(t *testing.T) { } func TestGrassroots_GetGESmartContracts(t *testing.T) { - p := NewProvider("https://api.tatum.io/v3/blockchain/node/celo-mainnet", CeloMainnet) + p := NewProvider("https://forno.celo.org", CeloMainnet) aMap, err := p.GetGESmartContracts(context.Background(), []string{ SarafuNetworkRegistry.Hex(), diff --git a/provider_test.go b/provider_test.go index b999594..cb239c2 100644 --- a/provider_test.go +++ b/provider_test.go @@ -5,7 +5,7 @@ import ( ) func TestNewProvider_NoPanic(t *testing.T) { - NewProvider("https://api.tatum.io/v3/blockchain/node/celo-mainnet", CeloMainnet) + NewProvider("https://forno.celo.org", CeloMainnet) } func TestNewProvider_Panic(t *testing.T) { diff --git a/simulate_test_e2e.go b/simulate_test_e2e.go index 12170a8..c871c9b 100644 --- a/simulate_test_e2e.go +++ b/simulate_test_e2e.go @@ -10,7 +10,7 @@ import ( ) func TestProvider_SimulateRevertedTx(t *testing.T) { - p := NewProvider("https://api.tatum.io/v3/blockchain/node/celo-mainnet", CeloMainnet) + p := NewProvider("https://forno.celo.org", CeloMainnet) type args struct { txHash common.Hash @@ -42,6 +42,7 @@ func TestProvider_SimulateRevertedTx(t *testing.T) { if got != tt.want { t.Errorf("Provider.SimulateRevertedTx() = %v, want %v", got, tt.want) } + t.Log(got) }) } }