Skip to content

Commit

Permalink
fixed withdrawal hash issue
Browse files Browse the repository at this point in the history
  • Loading branch information
badgersrus committed Jun 14, 2024
1 parent cc3fdf7 commit 44e9f35
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 28 deletions.
5 changes: 0 additions & 5 deletions go/ethadapter/geth_rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,6 @@ func (e *gethRPCClient) PrepareTransactionToRetry(ctx context.Context, txData ty
// prices aren't big enough for float error to matter
retryPrice, _ := retryPriceFloat.Int(nil)

println("from ", from.Hex())
println("unEstimatedTx.To() ", unEstimatedTx.To())
println("unEstimatedTx.Value() ", unEstimatedTx.Value())
println("unEstimatedTx.Data() ", unEstimatedTx.Data())

gasLimit, err := e.EthClient().EstimateGas(ctx, ethereum.CallMsg{
From: from,
To: unEstimatedTx.To(),
Expand Down
2 changes: 1 addition & 1 deletion go/wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func NewInMemoryWalletFromConfig(pkStr string, l1ChainID int64, logger gethlog.L

// SignTransaction returns a signed transaction
func (m *inMemoryWallet) SignTransaction(tx types.TxData) (*types.Transaction, error) {
return types.MustSignNewTx(m.prvKey, types.NewCancunSigner(m.chainID), tx), nil
return types.SignNewTx(m.prvKey, types.NewCancunSigner(m.chainID), tx)
}

// Address returns the current wallet address
Expand Down
4 changes: 2 additions & 2 deletions integration/datagenerator/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func RandomUInt64() uint64 {
return val.Uint64()
}

func RandomUint32() uint64 {
val, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt32))
func RandomUint16() uint64 {
val, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt16))
if err != nil {
panic(err)
}
Expand Down
38 changes: 19 additions & 19 deletions integration/eth2network/eth2_configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,26 +103,26 @@ const _baseGenesis = `{
"config": {
"chainId": 32382,
"homesteadBlock": 0,
"daoForkSupport": true,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"muirGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"arrowGlacierBlock": 0,
"grayGlacierBlock": 0,
"shanghaiTime": 1717192598,
"cancunTime": 1736601494,
"terminalTotalDifficulty": 0,
"terminalTotalDifficultyPassed": true,
"eip150Block": 6,
"eip155Block": 12,
"eip158Block": 12,
"byzantiumBlock": 18,
"constantinopleBlock": 24,
"petersburgBlock": 30,
"istanbulBlock": 36,
"muirGlacierBlock": 42,
"berlinBlock": 48,
"londonBlock": 54,
"arrowGlacierBlock": 60,
"grayGlacierBlock": 66,
"mergeNetsplitBlock": 72,
"shanghaiTime": 780,
"cancunTime": 840,
"terminalTotalDifficulty": 9454784,
"terminalTotalDifficultyPassed": true,
"clique": {
"period": 1,
"epoch": 1000
"period": 0,
"epoch": 30000
}
},
"nonce": "0",
Expand Down
2 changes: 1 addition & 1 deletion integration/eth2network/eth2_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestStartEth2Network(t *testing.T) {
binDir, err := EnsureBinariesExist()
assert.Nil(t, err)

chainID := int(datagenerator.RandomUint32())
chainID := int(datagenerator.RandomUint16())
randomWallets := make([]wallet.Wallet, _numTestNodes)
randomWalletAddrs := make([]string, _numTestNodes)
for i := 0; i < _numTestNodes; i++ {
Expand Down

0 comments on commit 44e9f35

Please sign in to comment.