diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab118df..ace7b36 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,10 +11,10 @@ jobs: build-and-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 55f2cba..d7bbb90 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -10,19 +10,19 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: v1.58.0 + version: v1.62.0 - name: golangci-lint warnings - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: v1.58.0 + version: v1.62.0 # Optional: golangci-lint command line arguments. args: -c .golangci-warnings.yml diff --git a/abi/encode_test.go b/abi/encode_test.go index e6acd19..e337ef6 100644 --- a/abi/encode_test.go +++ b/abi/encode_test.go @@ -894,14 +894,14 @@ func addPrimitiveRandomValues(t *testing.T, pool *map[TypeKind][]testUnit) { ufixedIndex := 0 for bitSize := uintBegin; bitSize <= uintEnd; bitSize += uintStepLength { - max := new(big.Int).Lsh(big.NewInt(1), uint(bitSize)) + lshBase := new(big.Int).Lsh(big.NewInt(1), uint(bitSize)) uintT, err := makeUintType(bitSize) require.NoError(t, err, "make uint type failure") uintTstr := uintT.String() for j := 0; j < uintTestCaseCount; j++ { - randVal, err := rand.Int(rand.Reader, max) + randVal, err := rand.Int(rand.Reader, lshBase) require.NoError(t, err, "generate random uint, should be no error") narrowest, err := castBigIntToNearestPrimitive(randVal, uint16(bitSize)) @@ -912,7 +912,7 @@ func addPrimitiveRandomValues(t *testing.T, pool *map[TypeKind][]testUnit) { } for precision := 1; precision <= ufixedPrecision; precision++ { - randVal, err := rand.Int(rand.Reader, max) + randVal, err := rand.Int(rand.Reader, lshBase) require.NoError(t, err, "generate random ufixed, should be no error") narrowest, err := castBigIntToNearestPrimitive(randVal, uint16(bitSize)) diff --git a/go.mod b/go.mod index 79d1562..f6d0e1b 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,12 @@ module github.com/algorand/avm-abi -go 1.21 +go 1.23 -toolchain go1.21.10 +toolchain go1.23.3 require ( github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 ) require ( diff --git a/go.sum b/go.sum index af8417d..a24f021 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=