funga

Signer and keystore daemon and library for cryptocurrency software development
Log | Files | Refs | README | LICENSE

commit 5313b4c8a6b1043b6b8779ef05f069d0bd06596a
parent 77c29d1719ab51f39db6988fd94dbbc23be86a2a
Author: nolash <dev@holbrook.no>
Date:   Thu,  6 Aug 2020 09:53:26 +0200

Translate dict input

Diffstat:
Mscripts/web3_middleware.py | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/web3_middleware.py b/scripts/web3_middleware.py @@ -43,6 +43,11 @@ class PlatformMiddleware: r.append(p) return r + if params.__class__.__name__ == 'list' and len(params) > 0: + return params[0] + + return params + def __call__(self, method, suspect_params): self.id_seq += 1 @@ -77,5 +82,5 @@ class PlatformMiddleware: w3 = Web3(WebsocketProvider('ws://127.0.0.1:8546')) w3.eth.personal = w3.geth.personal w3.middleware_onion.add(PlatformMiddleware) -print(w3.eth.personal.newAccount('foo')) -#print(w3.eth.blockNumber) +#print(w3.eth.personal.newAccount('foo')) +print(w3.eth.blockNumber)