Add eth_sendTransaction()

This commit is contained in:
Mark Spanbroek 2022-01-25 15:07:16 +01:00
parent b639e367c0
commit 82116d3b14
2 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,14 @@ func `%`*(bytes: seq[byte]): JsonNode =
func fromJson*(json: JsonNode, name: string, result: var seq[byte]) =
result = hexToSeqByte(json.getStr())
# byte arrays
func `%`*[N](bytes: array[N, byte]): JsonNode =
%("0x" & bytes.toHex)
func fromJson*[N](json: JsonNode, name: string, result: var array[N, byte]) =
hexToByteArray(json.getStr(), result)
# Address
func `%`*(address: Address): JsonNode =

View File

@ -6,3 +6,4 @@ proc eth_gasPrice(): UInt256
proc eth_getTransactionCount(address: Address, blockTag: BlockTag): UInt256
proc eth_estimateGas(transaction: Transaction): UInt256
proc eth_chainId(): UInt256
proc eth_sendTransaction(transaction: Transaction): array[32, byte]