Skip to content

Commit 3de0424

Browse files
committed
fix build
1 parent 7d86df4 commit 3de0424

File tree

5 files changed

+8
-25
lines changed

5 files changed

+8
-25
lines changed

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ vendor/
1515
*.sublime-workspace
1616

1717
# IDE - VSCode
18-
.vscode/*
19-
!.vscode/settings.json
20-
!.vscode/tasks.json
21-
!.vscode/launch.json
22-
!.vscode/extensions.json
18+
.vscode
2319

2420
# System Files
2521
.DS_Store

.idx/dev.nix

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
# see: https://developers.google.com/idx/guides/customize-idx-env
33
{ pkgs, ... }: {
44
# Which nixpkgs channel to use.
5-
channel = "stable-24.05"; # or "unstable"
5+
channel = "stable-24.11"; # or "unstable"
66

77
# Use https://search.nixos.org/packages to find packages
88
packages = [
99
pkgs.go
10-
# pkgs.python311
11-
# pkgs.python311Packages.pip
12-
# pkgs.nodejs_20
13-
# pkgs.nodePackages.nodemon
1410
pkgs.gnumake
1511
pkgs.gcc
1612
];
@@ -20,7 +16,6 @@
2016
idx = {
2117
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
2218
extensions = [
23-
# "vscodevim.vim"
2419
"golang.go"
2520
];
2621

client_test.go

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import (
44
"context"
55
"fmt"
66
"math/big"
7+
"testing"
78
)
89

9-
func ExampleRPCClient_GetBlockByNumber() {
10-
for _, network := range []string{mainnetURL, testnetURL} {
10+
func TestRPCClient_GetBlockByNumber(t *testing.T) {
11+
for _, network := range []string{mainnetURL} {
1112
exampleRPCClient_GetBlockByNumber(network)
1213
}
1314
// Output:
@@ -62,16 +63,6 @@ func exampleRPCClient_GetBlockByNumber(url string) {
6263
fmt.Println("Got genesis block.")
6364
}
6465

65-
sn, err := c.GetSnapshot(ctx)
66-
if err != nil {
67-
fmt.Printf("Failed to get snapshot: %v\n", err)
68-
}
69-
if sn == nil {
70-
fmt.Println("Latest snapshot nil.")
71-
} else {
72-
fmt.Println("Got latest snapshot.")
73-
}
74-
7566
initAlloc, ok := new(big.Int).SetString("1000000000000000000000000000", 10)
7667
if !ok {
7768
panic("failed to parse big.Int string")

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module github.com/gochain/web3
22

3-
go 1.22
3+
go 1.24
4+
45
toolchain go1.24.1
56

67
require (

web3_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func Test_parseParam(t *testing.T) {
6464
}
6565
for _, tt := range tests {
6666
t.Run(tt.name, func(t *testing.T) {
67-
got, err := ConvertArgument(tt.t, tt.s, tt.param)
67+
got, err := ConvertArgument(abi.Type{T: tt.t}, tt.param)
6868
if (err != nil) != tt.wantErr {
6969
t.Errorf("wantErr %v; error = %v", tt.wantErr, err)
7070
return

0 commit comments

Comments
 (0)