Skip to content

Commit 7831b0b

Browse files
authored
Merge pull request #729 from howjmay/go-ver
chore: Sync all the go version
2 parents b0043d7 + 35ac7a5 commit 7831b0b

File tree

34 files changed

+129
-126
lines changed

34 files changed

+129
-126
lines changed

.github/workflows/build-test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Go 1.x
1515
uses: actions/setup-go@v5
1616
with:
17-
go-version: "1.24.0"
17+
go-version: "1.24"
1818
id: go
1919

2020
- name: Check out code into the Go module directory
@@ -38,7 +38,7 @@ jobs:
3838
- name: Set up Go 1.x
3939
uses: actions/setup-go@v5
4040
with:
41-
go-version: "1.24.0"
41+
go-version: "1.24"
4242
id: go
4343

4444
- name: Check out code into the Go module directory
@@ -59,23 +59,23 @@ jobs:
5959
steps:
6060
- uses: actions/setup-go@v5
6161
with:
62-
go-version: "1.24.0"
62+
go-version: "1.24"
6363
id: go
6464

6565
- name: Check out code into the Go module directory
6666
uses: actions/checkout@v4
6767

6868
- name: Run global scope golangci-lint
69-
uses: golangci/golangci-lint-action@v7
69+
uses: golangci/golangci-lint-action@v8
7070
with:
71-
version: v2.0
71+
version: v2.5
7272
args: --timeout 15m0s
7373
skip-cache: true
7474

7575
- name: Run golangci-lint on wasp-cli
76-
uses: golangci/golangci-lint-action@v7
76+
uses: golangci/golangci-lint-action@v8
7777
with:
7878
working-directory: tools/wasp-cli
79-
version: v2.0
79+
version: v2.5
8080
args: --timeout 15m0s
8181
skip-cache: true

.github/workflows/go-mod-tidy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Go 1.x
1515
uses: actions/setup-go@v5
1616
with:
17-
go-version: "1.21"
17+
go-version: "1.24"
1818
id: go
1919

2020
- name: Generate token # generate a token to trigger the rest of the CI tasks... https://github.com/tibdex/github-app-token

.github/workflows/iotago-test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ jobs:
1414
- name: Set up Go 1.x
1515
uses: actions/setup-go@v5
1616
with:
17-
go-version: '1.21'
17+
go-version: '1.24'
1818

1919
- name: Test
2020
run: |
2121
cd clients/iota-go
2222
go test -v ./...
23-

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/iotaledger/wasp/v2
22

3-
go 1.23.8
3+
go 1.24
44

5-
toolchain go1.24.3
5+
toolchain go1.24.7
66

77
replace (
88
github.com/ethereum/go-ethereum => github.com/iotaledger/go-ethereum v1.16.2-wasp

packages/evm/evmutil/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
func AddressToIndexedTopic(addr common.Address) (ret common.Hash) {
1313
copy(ret[len(ret)-len(addr):], addr[:])
14-
return
14+
return ret
1515
}
1616

1717
func PackUint256(uint256 *big.Int) []byte {

packages/evm/jsonrpc/tracer_internal.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ func memoryCopy(m []byte, offset, size int64) (cpy []byte) {
4444
cpy = make([]byte, size)
4545
copy(cpy, m[offset:offset+size])
4646

47-
return
47+
return cpy
4848
}
49-
50-
return
49+
return nil
5150
}
5251

5352
// MemoryPtr returns a pointer to a slice of memory.

packages/evm/jsonrpc/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func (c *RPCCallArgs) parse() (ret ethereum.CallMsg) {
242242
if c.Input != nil {
243243
ret.Data = *c.Input
244244
}
245-
return
245+
return ret
246246
}
247247

248248
// SendTxArgs represents the arguments to submit a new transaction into the transaction pool.

packages/evm/solidity/abi.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func StorageSlot(n uint8) common.Hash {
1818
// StorageEncodeUint8 encodes an uint8 according to the storage spec.
1919
func StorageEncodeUint8(n uint8) (ret common.Hash) {
2020
ret[len(ret)-1] = n
21-
return
21+
return ret
2222
}
2323

2424
// StorageEncodeShortString encodes a short string according to the storage spec.
@@ -37,7 +37,7 @@ func StorageEncodeString(slotNumber uint8, s string) (ret map[common.Hash]common
3737
ret = make(map[common.Hash]common.Hash)
3838
if len(s) <= 31 {
3939
ret[mainSlot] = StorageEncodeShortString(s)
40-
return
40+
return ret
4141
}
4242

4343
ret[mainSlot] = common.BigToHash(big.NewInt(int64(len(s)*2) + 1))
@@ -59,7 +59,7 @@ func StorageEncodeString(slotNumber uint8, s string) (ret map[common.Hash]common
5959
}
6060
i++
6161
}
62-
return
62+
return ret
6363
}
6464

6565
// StorageEncodeBytes encodes a byte array according to the storage spec.
@@ -78,5 +78,5 @@ func StorageEncodeBytes32(b []byte) (ret common.Hash) {
7878
panic("expected len(b) == 32")
7979
}
8080
copy(ret[:], b)
81-
return
81+
return ret
8282
}

packages/hashing/hash.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func HashDataBlake2b(data ...[]byte) (ret HashValue) {
9191
}
9292
}
9393
copy(ret[:], h.Sum(nil))
94-
return
94+
return ret
9595
}
9696

9797
func hashBlake2b() hash.Hash {
@@ -114,7 +114,7 @@ func HashKeccak(data ...[]byte) (ret HashValue) {
114114
}
115115
}
116116
copy(ret[:], h.Sum(nil))
117-
return
117+
return ret
118118
}
119119

120120
func hashKeccak() hash.Hash {
@@ -134,7 +134,7 @@ func HashSha3(data ...[]byte) (ret HashValue) {
134134
}
135135
}
136136
copy(ret[:], h.Sum(nil))
137-
return
137+
return ret
138138
}
139139

140140
func hashSha3() hash.Hash {

packages/isc/vmerror.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ func (e *VMErrorTemplate) Create(params ...VMErrorParam) *VMError {
9090
// VMErrorTemplate by mistake, so that we don't crash the VM because of that.
9191
func (e *VMErrorTemplate) Error() string {
9292
// calling Sprintf so that it marks missing parameters as errors
93-
return fmt.Sprintf(e.messageFormat)
93+
var noargs []any
94+
return fmt.Sprintf(e.messageFormat, noargs...)
9495
}
9596

9697
func (e *VMErrorTemplate) MessageFormat() string {

0 commit comments

Comments
 (0)