* Fix contract_dsl event response parser
* Fix pending subscription event handler
* Use useDefaultSerializationIn for EventData
Surprisingly the pending event bug not detected when using ganache. It only manifest after migrated to hardhat. Also not detected on linux and windows CI. Only on macos amd64 CI, and sometimes on macos arm64 CI. Probably related to async timing trigger pending event?. But it's a genuine bug, dated back far before migration from stdlib/json to json-serialization.
The `writeValue` added for `BlockNumber` in #136 interferes with other
`uint64` because `BlockNumber` is not `distinct`. Marking it `distinct`
avoids polluting global serialization logic.
In #108 a regression got introduced, resulting in `fromBlock`, `toBlock`
and `blockHash` no longer being sent when a client calls `eth_getLogs`.
This may break the deposits import process in `nimbus-eth2`, resulting
in messages such as:
```
ERR 2024-02-06 19:52:34.474+01:00 The Eth1 chain is not synced ourDepositsCount=0 targetDepositsCount=403
```
Fixing the regression restores successful import messages:
```
INF 2024-02-06 22:12:14.863+01:00 Eth1 sync progress topics="elmon" blockNumber=1349452 depositsProcessed=3
```
* Fix problem with contract out of assets
* Add nully value json test
* Fix bug with passing null to a few functions
* Typesafe U256 parsing
* Update readme for the web3 to include runner info
* Cleanup commits
Strip out unused JSON
Update comment
Remove echo
Added DynamicBytes test
More correct naming
Remove one extra double check
* Add specific object tests
* Ensure we cover different status types
* Add header comments
* Cleanup
* Add more tests
* Cleanup
* Revert docs
* Nimpretty file
* Fix issue in base stew
* v0.2.4
* Fix test
---------
Co-authored-by: jangko <jangko128@gmail.com>
* Refactoring, contract dsl wasm compatibility, fixes in encoding/decoding.
* Tests
* Fixed Nim 1.* compatibility
* Some backward compatibility
* Minor tweaks, and a safety check
* Update web3/encoding.nim
Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
* Update web3.nim
Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
* Use stew.assign instead of reinventing the wheel
* Fixed string decoder. Removed extra allocations.
* Added test for string decoder
* v0.2.2
---------
Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
Co-authored-by: jangko <jangko128@gmail.com>
* 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
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).