Skip to content

v0.4.0

Compare
Choose a tag to compare
@DenisCarriere DenisCarriere released this 13 Jun 19:44
· 19 commits to main since this release

New 🌟 JSON RPC methods (Request to EOS RPC)

  • eth_gasPrice - Returns the current gas price on the network in wei.
  • eth_sendRawTransaction - Creates new message call transaction or a contract creation for signed transactions.
  • eth_chainId - Returns the current network/chain ID, used to sign replay-protected transaction introduced in EIP-155.
  • eth_blockNumber - Returns the latest block number of the blockchain.
  • eth_getBalance - Returns the balance of given account address in wei.
  • net_version - Returns the current network id.
  • eth_getCode - Returns the compiled bytecode of a smart contract.

New 🌟 JSON RPC methods (Proxy to EVM RPC)

  • eth_estimateGas - Returns an estimation of gas for a given transaction.
  • eth_getTransactionCount - Returns the number of transactions sent from an address.
  • eth_getTransactionReceipt - Returns the receipt of a transaction by transaction hash.
  • eth_getBlockByHash - Returns information of the block matching the given block hash.
  • eth_getBlockByNumber - Returns information of the block matching the given block number.

JSON RPC methods (Request to EOS RPC)

  • eth_gasPrice - Returns the current gas price on the network in wei.
  • eth_sendRawTransaction - Creates new message call transaction or a contract creation for signed transactions.
  • eth_chainId - Returns the current network/chain ID, used to sign replay-protected transaction introduced in EIP-155.

New 🌟.env & CLI updates

  • add EVM_RPC_ENDPOINT env & --rpc-evm-endpoint flag
  • add --rpc-endpoint flag
# EOS RPC (optional)
RPC_ENDPOINT=https://eos.api.eosnation.io
CHAIN_ID=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906

# EVM RPC (optional)
EVM_RPC_ENDPOINT=https://api.evm.eosnetwork.com

CLI

eos-evm-miner start --help
Usage: @enf/eos-evm-miner start [options]

Start JSON RPC Server

Options:
  --private-key <string>       Miner private key (ex: "PVT_K1_...")
  --account <string>           Miner account name (ex: "miner.evm")
  --permission <string>        Miner permission (default: "active")
  -p --port <int>              JSON RPC listens on port number, listen for
                               incoming Ethereum transactions. (default:
                               "50305")
  --hostname <string>          JSON RPC listens on hostname, listen for
                               incoming Ethereum transactions (ex: "127.0.0.1)"
  --metrics-listen-port <int>  The process will listen on this port for
                               Prometheus metrics requests (default: "9102")
  --metrics-disabled           If set, will not send metrics to Prometheus
  --verbose                    Enable verbose logging
  --lock-gas-price             Lock gas price as hex value (ex: "0x22ecb25c00")
  --lock-chain-id              Lock chain ID as hex value (ex: "0x4571")
  --lock-genesis-time          Lock genesis time (ex: "2023-04-05T02:18:09")
  --rpc-endpoint               EOS RPC endpoint (ex:
                               "https://eos.api.eosnation.io")
  --rpc-evm-endpoint           EOS RPC endpoint (ex:
                               "https://api.evm.eosnetwork.com")
  -h, --help                   display help for command

.env

# miner (required)
PRIVATE_KEY=PVT_K1_...
MINER_ACCOUNT=miner.enf

# miner (optional)
MINER_PERMISSION=active

# RPC EOS (optional)
RPC_ENDPOINT=https://eos.api.eosnation.io
CHAIN_ID=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906

# RPC EVM (optional)
RPC_EVM_ENDPOINT=https://api.evm.eosnetwork.com

# JSON RPC (optional)
PORT=50305
HOSTNAME=127.0.0.1
LOCK_GAS_PRICE=0x22ecb25c00
LOCK_CHAIN_ID=0x4571

# Prometheus Metrics
PROMETHEUS_PORT=9102
METRICS_DISABLED=false

# CLI (optional)
VERBOSE=true