Skip to content

Commit 2c819dd

Browse files
committed
tests: update remaining tests for 89c2627
1 parent 25661b2 commit 2c819dd

File tree

10 files changed

+101
-101
lines changed

10 files changed

+101
-101
lines changed

accounts/abi/abigen/bind_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ var bindTests = []struct {
9191
sim := backends.NewSimulatedBackend(types.GenesisAlloc{auth.From: {Balance: big.NewInt(10000000000000000)}}, 10000000)
9292
defer sim.Close()
9393
94-
maxUint256 := uint256.MustFromHex("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
94+
maxU256 := uint256.MustFromHex("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
9595
9696
// Deploy an interaction tester contract and call a transaction on it
97-
_, _, interactor, err := DeployToken(auth, sim, maxUint256, "TestToken", 19, "Test")
97+
_, _, interactor, err := DeployToken(auth, sim, maxU256, "TestToken", 19, "Test")
9898
if err != nil {
9999
t.Fatalf("Failed to deploy interactor contract: %v", err)
100100
}
@@ -104,7 +104,7 @@ var bindTests = []struct {
104104
toKey, _ := crypto.GenerateKey()
105105
toAddr := crypto.PubkeyToAddress(toKey.PublicKey)
106106
107-
transferValue := maxUint256
107+
transferValue := maxU256
108108
_, err = interactor.Transfer(auth, toAddr, transferValue)
109109
if err != nil {
110110
t.Fatalf("Failed to transfer tokens: %v", err)

accounts/abi/bind/v2/base_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"github.com/ethereum/go-ethereum/core/types"
3333
"github.com/ethereum/go-ethereum/crypto"
3434
"github.com/ethereum/go-ethereum/rlp"
35+
"github.com/holiman/uint256"
3536
"github.com/stretchr/testify/assert"
3637
)
3738

@@ -202,7 +203,7 @@ func TestUnpackIndexedStringTyLogIntoMap(t *testing.T) {
202203
expectedReceivedMap := map[string]interface{}{
203204
"name": hash,
204205
"sender": common.HexToAddress("0x376c47978271565f56DEB45495afa69E59c16Ab2"),
205-
"amount": big.NewInt(1),
206+
"amount": uint256.NewInt(1),
206207
"memo": []byte{88},
207208
}
208209
unpackAndCheck(t, bc, expectedReceivedMap, mockLog)
@@ -246,7 +247,7 @@ func TestUnpackIndexedSliceTyLogIntoMap(t *testing.T) {
246247
expectedReceivedMap := map[string]interface{}{
247248
"names": hash,
248249
"sender": common.HexToAddress("0x376c47978271565f56DEB45495afa69E59c16Ab2"),
249-
"amount": big.NewInt(1),
250+
"amount": uint256.NewInt(1),
250251
"memo": []byte{88},
251252
}
252253
unpackAndCheck(t, bc, expectedReceivedMap, mockLog)
@@ -272,7 +273,7 @@ func TestUnpackIndexedArrayTyLogIntoMap(t *testing.T) {
272273
expectedReceivedMap := map[string]interface{}{
273274
"addresses": hash,
274275
"sender": common.HexToAddress("0x376c47978271565f56DEB45495afa69E59c16Ab2"),
275-
"amount": big.NewInt(1),
276+
"amount": uint256.NewInt(1),
276277
"memo": []byte{88},
277278
}
278279
unpackAndCheck(t, bc, expectedReceivedMap, mockLog)
@@ -299,7 +300,7 @@ func TestUnpackIndexedFuncTyLogIntoMap(t *testing.T) {
299300
expectedReceivedMap := map[string]interface{}{
300301
"function": functionTy,
301302
"sender": common.HexToAddress("0x376c47978271565f56DEB45495afa69E59c16Ab2"),
302-
"amount": big.NewInt(1),
303+
"amount": uint256.NewInt(1),
303304
"memo": []byte{88},
304305
}
305306
unpackAndCheck(t, bc, expectedReceivedMap, mockLog)
@@ -322,7 +323,7 @@ func TestUnpackIndexedBytesTyLogIntoMap(t *testing.T) {
322323
expectedReceivedMap := map[string]interface{}{
323324
"content": hash,
324325
"sender": common.HexToAddress("0x376c47978271565f56DEB45495afa69E59c16Ab2"),
325-
"amount": big.NewInt(1),
326+
"amount": uint256.NewInt(1),
326327
"memo": []byte{88},
327328
}
328329
unpackAndCheck(t, bc, expectedReceivedMap, mockLog)

accounts/abi/bind/v2/internal/contracts/db/bindings.go

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

accounts/abi/bind/v2/internal/contracts/events/bindings.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)