klaytn/caver-js

Release caver-js v1.9.0

Closed this issue · 1 comments

JSON RPC Layer
Add effectiveGasPrice field to the return object of caver.rpc.klay.getTransactionReceipt

Transaction Layer
Implement tx.getSuggestedGasPrice → Depends on hard fork, returns suggested gas price

Modify optional field setting logic
(Before KIP-71 Hardfork) header.baseFeePerGas === undefined || header.baseFeePerGas =< 0

  • tx.type == EthereumDynamicFeeTx
    • maxPriorityFeePerGas === undefined → set with return value of caver.rpc.klay.getMaxPriorityFeePerGas
    • maxFeePerGas === undefined → set with return value of caver.rpc.klay.getGasPrice
  • tx.type != EthereumDynamicFeeTx
    • gasPrice === undefined → set with return value of caver.rpc.klay.getGasPrice
      (After KIP-71 Hardfork) header.baseFeePerGas !== undefined || header.baseFeePerGas > 0
  • tx.type === EthereumDynamicFeeTx
    • maxPriorityFeePerGas === undefined → set with return value of caver.rpc.klay.getMaxPriorityFeePerGas (Klaytn will ignore this)
    • maxFeePerGas → set with baseFee * 2
  • tx.type != EthereumDynamicFeeTx
    • gasPrice === undefined → set with baseFee * 2
  • Modify tx.fillTransaction logic for dynamic base fee → use tx.getSuggestedGasPrice