Commit Graph

58 Commits

Author SHA1 Message Date
Dustin Brody 0b5466f56e use enum for ForkchoiceUpdatedStatus.status 2022-01-13 18:47:16 +00:00
Dustin Brody 980461c982 use enum for ExecutePayloadResponse.status 2022-01-12 11:48:41 +00:00
Mark Spanbroek 2b9e8166d4 Add $ proc for DynamicBytes 2021-12-14 08:21:39 +01:00
Mark Spanbroek 47a02504dd Fix decoding of dynamic bytes 2021-12-14 08:21:39 +01:00
Mark Spanbroek 25ea5f5e7c Fix eth_gasPrice signature
Fixes conversion error when getting gas price.
Returns a QUANTITY according to the spec.
2021-12-14 08:21:39 +01:00
Mark Spanbroek c657134018 Fix encoding of gas price in transaction
Hardhat network doesn't support gas price
that is not a QUANTITY.
2021-12-14 08:21:39 +01:00
Mark Spanbroek a381a21c64 Fix encoding of DATA in transaction
Hardhat network doesn't accept a data parameter that
is an empty string.
2021-12-14 08:21:39 +01:00
Dustin Brody 0982a0a6e4
pre-allocate outbut buffer for typedtransaction JSON-RPC reading 2021-12-13 11:51:22 +00:00
Dustin Brody fe0674be9c
update engine API signatures to alpha.5 2021-12-07 11:25:48 +00:00
Mark Spanbroek 217a2c0b6a Fix signature of eth_sign
Message to sign should be sent as a DATA hex string, not a
JSON array of bytes.

See also: https://eth.wiki/json-rpc/API#eth_sign
2021-11-30 09:32:59 +01:00
Dustin Brody 41fc21595c
payloadId is now an 8-byte quantity, not per se a number 2021-11-15 11:21:39 +00:00
Dustin Brody 183cc8f407
working Geth engine RPC interop 2021-11-09 14:06:16 +00:00
Dustin Brody 94635bbe20
allow for null parameters and responses where required in engine API 2021-11-08 17:00:02 +00:00
Dustin Brody 27c19ce105
Kintsugi engine API 2021-11-08 08:14:43 +00:00
Dustin Brody d101f395e9
remove last part of consensusValidated 2021-10-22 15:49:16 +00:00
Dustin Brody 16ae908e49
fix extra_bytes definition and keep block_hash consistent with spec 2021-10-22 11:39:01 +00:00
Zahary Karadjov 9bf424a6ef Add DynamicBytes.len 2021-10-14 15:22:54 +03:00
Zahary Karadjov 74ae794993 More complete DynamicBytes implementation 2021-10-14 14:17:20 +03:00
Zahary Karadjov 9a0f1425c1 Remove engine_consensusValidated 2021-10-14 13:44:13 +03:00
Zahary Karadjov 484f607ae6 Change blockNumber to UIn256 to make interfacing with nimbus-eth1 easier 2021-10-06 10:45:18 +02:00
Zahary Karadjov 3a93265075 Handle the realistic large values for total difficulty 2021-10-04 17:41:19 +02:00
Zahary Karadjov 9a23474afb Add definitions related to the new execution engine APIs 2021-09-29 22:25:09 +03:00
Eric Mastro d62f8105a1
fix: allow Bool input/output types for contracts (#39)
* fix: allow Bool input/output types for contracts

Contracts created with the `contract` macro and having a method with a `Bool` input/output type were failing to compile. Example:
```
contract(MyContract):
  proc enableTransfers(
    transfersEnabled: Bool
  )
```
Failed with:
```
Error: type mismatch: got <type Bool>
but expected one of:
proc unknownType()
  first type mismatch at position: 1
  extra argument given

expression: unknownType(Bool)
```
This fix enables translating `Bool` type signatures to solidity’s `bool` type.

* add Bool encoding/decoding test
2021-09-21 12:02:06 +02:00
jangko 97e05aea65
fix transaction_signing due to EIP-1559 changes 2021-06-27 13:08:47 +07:00
Jacek Sieka 57f86f752b
bump nim-eth, use legacy tx for sending (#36) 2021-05-17 16:34:13 +02:00
Viktor Kirilov dde382f70e fixed a problem with geth when sending newHeads with an empty {} argument 2020-09-24 15:56:42 +03:00
jangko 2ac463ce9d
fixes wrong import 2020-09-21 13:26:59 +07:00
Zahary Karadjov fc0c27a730
Fix the CI failure 2020-08-10 23:08:44 +03:00
emizzle 3900d91958
refactor: move encoding/decoding functions to sub-lib
Move all encoding/decoding functions to a separate sub-library, to allow libraries to use these functions without needing to import the entire library (ie hopefully without needing to import secp256k1).
2020-08-10 19:43:42 +10:00
Zahary Karadjov 0361338cea
Correct nonce values when sending multiple transactions 2020-08-01 19:41:39 +03:00
Zahary Karadjov 9fb271b876
Allow run-time block IDs to be used in the RPC calls 2020-07-28 16:37:53 +03:00
Zahary Karadjov 4fe1a81ce7
Add helpers for using Web3 types on the Confutils command-line 2020-07-21 22:17:19 +03:00
Zahary Karadjov 04be808890
Allow the Web3 types to be saved in Json files; Clean up code duplication with stew/byteutils 2020-07-10 01:07:58 +03:00
Jacek Sieka dd132ba024
rng fix 2020-07-07 13:46:02 +02:00
Zahary Karadjov 227927ddc8
Move the hex parsing routines to ethtypes to make them more accessible 2020-07-02 13:03:38 +03:00
Zahary Karadjov 91eb7c4a47
Remove a pointless file (a legacy from the time when web3 was extracted from nim-json-rpc) 2020-06-30 15:59:29 +03:00
Zahary Karadjov 71524f0f59
Fix nimble test 2020-06-30 15:59:21 +03:00
Zahary Karadjov a75519fe12
Field order that matches the results of Infura
This will be an useful optimisation if we switch to nim-json-seriazation
2020-06-27 14:51:38 +03:00
Zahary Karadjov 4590f21d5d
Added `web3.subscribeForBlockHeaders`; Stricter error handling 2020-06-26 18:30:55 +03:00
Zahary Karadjov 694ff2ad74
More hot fixes for Infura compatiblity 2020-06-24 15:13:36 +03:00
Jacek Sieka 806547ddd1
secp: requiresInit 2020-06-22 17:09:35 +02:00
Zahary Karadjov 05f2a17ba4
Make some string-conversions more friendly for Infura use (0x-prefixes are required there) 2020-06-22 15:27:47 +03:00
Zahary Karadjov ee69dbd48a
A helper for checking if a contract has been deployed at a particular block 2020-06-19 19:42:55 +03:00
Zahary Karadjov 0ca6089962
Misc fixes
* Allow BlockHash et al to be used as keys in hash tables
* Switch from Exceptions to CatchableErrors
* Export some helpers that needed in NBC
2020-04-18 17:24:59 +03:00
Zahary Karadjov 270fd64620
Add convenience API for obtaining logs from a smart contract event 2020-04-18 17:24:59 +03:00
Zahary Karadjov 6927cd08a2
Allow specifying a block number when making smart contract calls
Other changes:

* More accurate RPC signatures
* Handle empty responses from the Web3 provider in `eth_call`
2020-04-18 17:24:59 +03:00
Jacek Sieka 969adf2f1e
keys: fix deprecations 2020-04-04 18:51:27 +02:00
Yuriy Glukhov 37fc461114
Fixed serialization compatibility with geth. Added getMinedTransactionReceipt 2019-10-30 15:05:44 +02:00
Yuriy Glukhov 7ed8080ec3
Use BlockHash and TxHash types where appropriate 2019-09-30 13:39:03 +03:00
Yuriy Glukhov 08909f9972 Fixed gcsafety issues for newer nim 2019-09-09 23:42:39 -04:00