Skip to content

Commit

Permalink
Fix typo; Add E2E coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
swift1337 committed Aug 5, 2024
1 parent dad95a5 commit fae68d5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions e2e/e2etests/test_eth_withdraw.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package e2etests
import (
"math/big"

ethcommon "github.com/ethereum/go-ethereum/common"
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/stretchr/testify/require"

"github.com/zeta-chain/zetacore/e2e/runner"
Expand Down Expand Up @@ -37,5 +39,18 @@ func TestEtherWithdraw(r *runner.E2ERunner, args []string) {

utils.RequireCCTXStatus(r, cctx, crosschaintypes.CctxStatus_OutboundMined)

withdrawalReceipt := mustFetchEthReceipt(r, cctx)
require.Equal(r, uint8(ethtypes.DynamicFeeTxType), withdrawalReceipt.Type, "receipt type mismatch")

r.Logger.Info("TestEtherWithdraw completed")
}

func mustFetchEthReceipt(r *runner.E2ERunner, cctx *crosschaintypes.CrossChainTx) *ethtypes.Receipt {
hash := cctx.GetCurrentOutboundParam().Hash
require.NotEmpty(r, hash, "outbound hash is empty")

receipt, err := r.EVMClient.TransactionReceipt(r.Ctx, ethcommon.HexToHash(hash))
require.NoError(r, err)

return receipt
}
2 changes: 1 addition & 1 deletion zetaclient/chains/evm/observer/observer_gas.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (ob *Observer) supportsPriorityFee(ctx context.Context) (bool, error) {
defer ob.Mu().Unlock()

ob.priorityFeeConfig.checked = true
ob.priorityFeeConfig.checked = isSupported
ob.priorityFeeConfig.supported = isSupported

return isSupported, nil
}
Expand Down

0 comments on commit fae68d5

Please sign in to comment.