commit af14af1ae57f539dc982e8413c98b4069b1840b4
parent 1002e1b3f799aff5b20558876f62009b4ea377cc
Author: lash <dev@holbrook.no>
Date: Tue, 27 Jun 2023 21:22:51 +0100
Fix breaking string arg for eth-encode cli tool
Diffstat:
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,3 +1,5 @@
+- 0.4.27
+ * Fix break in encoding string values for eth-encode CLI tool
- 0.4.26
* Upgrade funga-eth to ensure safe-pysha3
* Limit python runtime environment to <3.11 (eth-tester environment not currently compatible)
diff --git a/chainlib/eth/cli/encode.py b/chainlib/eth/cli/encode.py
@@ -92,11 +92,12 @@ class CLIEncoder(ABIContractEncoder):
if r == None:
raise ValueError('no translation for type {}'.format(typ))
logg.debug('type {} translated to {}'.format(typ, r[0]))
- if int(val, 16) == 0:
- if r[0][0] == 'B':
- val = ZERO_CONTENT
- elif r[0][0] == 'A':
- val = ZERO_ADDRESS
+ if r[0] != 'STRING':
+ if int(val, 16) == 0:
+ if r[0][0] == 'B':
+ val = ZERO_CONTENT
+ elif r[0][0] == 'A':
+ val = ZERO_ADDRESS
return (r[1], val,)
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = chainlib-eth
-version = 0.4.26
+version = 0.4.27
description = Ethereum implementation of the chainlib interface
author = Louis Holbrook
author_email = dev@holbrook.no