Module era_test_node::utils

source ·

Functions

  • Adjusts the L1 gas price for a transaction based on the current pubdata price and the fair L2 gas price. If the current pubdata price is small enough, returns the original L1 gas price. Otherwise, calculates a new L1 gas price based on the fair L2 gas price and the transaction gas per pubdata limit.
  • Creates a [DebugCall] from a [L2Tx], [VmExecutionResultAndLogs] and a list of [Call]s.
  • Creates and inserts a given number of empty blocks into the node, with a given interval between them. The blocks will be empty (contain no transactions). Currently this is quite slow - as we invoke the VM for each operation, in the future we might want to optimise it by adding a way to set state via some system contract call.
  • Returns a [jsonrpc_core::Error] indicating that the method is not implemented.
  • Takes long integers and returns them in human friendly format with “_”. For example: 12_334_093
  • Returns the actual [U64] block number from [BlockNumber].