summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornolash <dev@holbrook.no>2021-11-14 09:06:07 +0100
committernolash <dev@holbrook.no>2021-11-14 09:06:07 +0100
commit2e191625084b600ea51cc418af7b02846b387b95 (patch)
treee0580fbd36941a2f7dfddbfe96e5f1ba458ba804
parenta5ecd2deedf2ccc240f805e81f9bad0e65346183 (diff)
Minter with numeric token id0.0.2-dev
-rw-r--r--python/eth_badgetoken/runnable/mint.py9
-rw-r--r--python/requirements.txt6
2 files changed, 11 insertions, 4 deletions
diff --git a/python/eth_badgetoken/runnable/mint.py b/python/eth_badgetoken/runnable/mint.py
index 5832607..f54ea02 100644
--- a/python/eth_badgetoken/runnable/mint.py
+++ b/python/eth_badgetoken/runnable/mint.py
@@ -54,7 +54,14 @@ chain_spec = ChainSpec.from_chain_str(config.get('CHAIN_SPEC'))
token_id_bytes = bytes.fromhex(strip_0x(config.get('_TOKEN_ID')))
if len(token_id_bytes) != 32:
- raise ValueError('token id must be 32 bytes')
+ token_id_int = None
+ try:
+ token_id_int = int(config.get('_TOKEN_ID'))
+ except:
+ token_id_int = strip_0x(config.get('_TOKEN_ID'))
+ token_id_int = int(token_id_int, 16)
+ token_id_bytes = token_id_int.to_bytes(32, byteorder='big')
+ logg.info('numeric token id value {} parsed to {}'.format(config.get('_TOKEN_ID'), token_id_bytes.hex()))
token_id = int.from_bytes(token_id_bytes, byteorder='big')
diff --git a/python/requirements.txt b/python/requirements.txt
index 7aee584..a458720 100644
--- a/python/requirements.txt
+++ b/python/requirements.txt
@@ -1,3 +1,3 @@
-chainlib-eth>=0.0.10a11,<0.1.0
-eth-erc20>=0.1.0,<0.2.0
-eth-owned>=0.0.3a1,<0.1.0
+chainlib-eth~=0.0.12
+eth-erc20~=0.1.2
+eth-owned~=0.0.4a3