Merge pull request #2 from allora-network/fix/correctly-extract-call-args

Update argv parsing to account for topic id
This commit is contained in:
Cristian Conache 2024-03-13 19:57:00 +02:00 committed by GitHub
commit 0322527fbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,8 +15,10 @@ def process(token_name):
if __name__ == "__main__":
# Your code logic with the parsed argument goes here
try:
if len(sys.argv) >= 2:
token_name = sys.argv[1]
if len(sys.argv) >= 3:
# Not using to discriminate by topicId for simplicity.
# topic_id = sys.argv[1]
token_name = sys.argv[2]
else:
token_name = "ETH"
process(token_name=token_name)