From 892a4889f5880a0c0721504c4fca7883d29578d1 Mon Sep 17 00:00:00 2001 From: Dmitry S <11892559+swift1337@users.noreply.github.com> Date: Tue, 26 Nov 2024 19:39:34 +0100 Subject: [PATCH] Disable EIP-1559 --- zetaclient/chains/evm/signer/gas.go | 2 ++ zetaclient/chains/evm/signer/sign_test.go | 1 + zetaclient/chains/evm/signer/signer.go | 43 ++++++++++++----------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/zetaclient/chains/evm/signer/gas.go b/zetaclient/chains/evm/signer/gas.go index 6727758edd..586863a009 100644 --- a/zetaclient/chains/evm/signer/gas.go +++ b/zetaclient/chains/evm/signer/gas.go @@ -57,6 +57,8 @@ func (g Gas) validate() error { // or DynamicFeeTx{} (post EIP-1559). // // Returns true if priority fee is <= 0. +// +//nolint:unused // https://github.com/zeta-chain/node/issues/3221 func (g Gas) isLegacy() bool { return g.PriorityFee.Sign() < 1 } diff --git a/zetaclient/chains/evm/signer/sign_test.go b/zetaclient/chains/evm/signer/sign_test.go index 523744f053..d87badfe1d 100644 --- a/zetaclient/chains/evm/signer/sign_test.go +++ b/zetaclient/chains/evm/signer/sign_test.go @@ -59,6 +59,7 @@ func TestSigner_SignConnectorOnReceive(t *testing.T) { }) t.Run("SignOutbound - should successfully sign DynamicFeeTx", func(t *testing.T) { + t.Skip("Skipped due to https://github.com/zeta-chain/node/issues/3221") // ARRANGE const ( gwei = 1_000_000_000 diff --git a/zetaclient/chains/evm/signer/signer.go b/zetaclient/chains/evm/signer/signer.go index 33a1e8656a..e23203627a 100644 --- a/zetaclient/chains/evm/signer/signer.go +++ b/zetaclient/chains/evm/signer/signer.go @@ -219,7 +219,7 @@ func (signer *Signer) Sign( } func newTx( - chainID *big.Int, + _ *big.Int, data []byte, to ethcommon.Address, amount *big.Int, @@ -230,27 +230,28 @@ func newTx( return nil, errors.Wrap(err, "invalid gas parameters") } - if gas.isLegacy() { - return ethtypes.NewTx(ðtypes.LegacyTx{ - To: &to, - Value: amount, - Data: data, - GasPrice: gas.Price, - Gas: gas.Limit, - Nonce: nonce, - }), nil - } - - return ethtypes.NewTx(ðtypes.DynamicFeeTx{ - ChainID: chainID, - To: &to, - Value: amount, - Data: data, - GasFeeCap: gas.Price, - GasTipCap: gas.PriorityFee, - Gas: gas.Limit, - Nonce: nonce, + // https://github.com/zeta-chain/node/issues/3221 + //if gas.isLegacy() { + return ethtypes.NewTx(ðtypes.LegacyTx{ + To: &to, + Value: amount, + Data: data, + GasPrice: gas.Price, + Gas: gas.Limit, + Nonce: nonce, }), nil + //} + // + //return ethtypes.NewTx(ðtypes.DynamicFeeTx{ + // ChainID: chainID, + // To: &to, + // Value: amount, + // Data: data, + // GasFeeCap: gas.Price, + // GasTipCap: gas.PriorityFee, + // Gas: gas.Limit, + // Nonce: nonce, + //}), nil } func (signer *Signer) broadcast(ctx context.Context, tx *ethtypes.Transaction) error {