@@ -250,18 +250,18 @@ func TestCreateTxFromEthTx(t *testing.T) {
250250 account , err := NewAccount ()
251251 require .NoError (t , err )
252252
253+ account .Nonce = 42
253254 receiver := common .HexToAddress ("0x1234567890123456789012345678901234567890" )
254255 scenario := & TxScenario {
255256 Name : "TestScenario" ,
256- Nonce : 42 ,
257257 Sender : account ,
258258 Receiver : receiver ,
259259 }
260260
261261 // Create a test transaction using DynamicFeeTx (EIP-1559)
262262 tx := types .NewTx (& types.DynamicFeeTx {
263- ChainID : big .NewInt (1329 ), // Sei testnet chain ID
264- Nonce : scenario .Nonce ,
263+ ChainID : big .NewInt (713714 ), // Sei testnet chain ID
264+ Nonce : scenario .Sender . Nonce ,
265265 GasTipCap : big .NewInt (2000000000 ), // 2 Gwei tip
266266 GasFeeCap : big .NewInt (20000000000 ), // 20 Gwei max fee
267267 Gas : 21000 , // Gas limit
@@ -314,15 +314,15 @@ func TestLoadTxShardID(t *testing.T) {
314314 account := accounts [i % len (accounts )]
315315 scenario := & TxScenario {
316316 Name : "TestScenario" ,
317- Nonce : uint64 (i ),
318317 Sender : account ,
319318 Receiver : common.Address {},
320319 }
321320
321+ scenario .Sender .Nonce = uint64 (i )
322322 // Create a simple transaction
323323 tx := types .NewTx (& types.DynamicFeeTx {
324- ChainID : big .NewInt (1329 ), // Sei testnet chain ID
325- Nonce : scenario .Nonce ,
324+ ChainID : big .NewInt (713714 ), // Sei testnet chain ID
325+ Nonce : scenario .Sender . Nonce ,
326326 GasTipCap : big .NewInt (2000000000 ), // 2 Gwei tip
327327 GasFeeCap : big .NewInt (20000000000 ), // 20 Gwei max fee
328328 Gas : 21000 , // Gas limit
@@ -374,14 +374,13 @@ func TestLoadTxShardIDConsistency(t *testing.T) {
374374
375375 scenario := & TxScenario {
376376 Name : "TestScenario" ,
377- Nonce : 0 ,
378377 Sender : account ,
379378 Receiver : common.Address {},
380379 }
381380
382381 tx := types .NewTx (& types.DynamicFeeTx {
383- ChainID : big .NewInt (1329 ), // Sei testnet chain ID
384- Nonce : scenario .Nonce ,
382+ ChainID : big .NewInt (713714 ), // Sei testnet chain ID
383+ Nonce : scenario .Sender . Nonce ,
385384 GasTipCap : big .NewInt (2000000000 ), // 2 Gwei tip
386385 GasFeeCap : big .NewInt (20000000000 ), // 20 Gwei max fee
387386 Gas : 21000 , // Gas limit
@@ -408,16 +407,17 @@ func TestTxScenario(t *testing.T) {
408407
409408 receiver := common .HexToAddress ("0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" )
410409
410+ account .Nonce = 123
411+
411412 scenario := & TxScenario {
412413 Name : "TestScenario" ,
413- Nonce : 123 ,
414414 Sender : account ,
415415 Receiver : receiver ,
416416 }
417417
418418 // Verify all fields are set correctly
419419 assert .Equal (t , "TestScenario" , scenario .Name )
420- assert .Equal (t , uint64 (123 ), scenario .Nonce )
420+ assert .Equal (t , uint64 (123 ), scenario .Sender . Nonce )
421421 assert .Equal (t , account , scenario .Sender )
422422 assert .Equal (t , receiver , scenario .Receiver )
423423}
@@ -477,14 +477,13 @@ func BenchmarkCreateTxFromEthTx(b *testing.B) {
477477
478478 scenario := & TxScenario {
479479 Name : "BenchmarkScenario" ,
480- Nonce : 0 ,
481480 Sender : account ,
482481 Receiver : common.Address {},
483482 }
484483
485484 tx := types .NewTx (& types.DynamicFeeTx {
486- ChainID : big .NewInt (1329 ), // Sei testnet chain ID
487- Nonce : scenario .Nonce ,
485+ ChainID : big .NewInt (713714 ), // Sei testnet chain ID
486+ Nonce : scenario .Sender . Nonce ,
488487 GasTipCap : big .NewInt (2000000000 ), // 2 Gwei tip
489488 GasFeeCap : big .NewInt (20000000000 ), // 20 Gwei max fee
490489 Gas : 21000 , // Gas limit
0 commit comments