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:
		
							
								
								
									
										6
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								main.py
									
									
									
									
									
								
							@ -15,8 +15,10 @@ def process(token_name):
 | 
				
			|||||||
if __name__ == "__main__":
 | 
					if __name__ == "__main__":
 | 
				
			||||||
    # Your code logic with the parsed argument goes here
 | 
					    # Your code logic with the parsed argument goes here
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        if len(sys.argv) >= 2:
 | 
					        if len(sys.argv) >= 3:
 | 
				
			||||||
            token_name = sys.argv[1]
 | 
					            # Not using to discriminate by topicId for simplicity.
 | 
				
			||||||
 | 
					            # topic_id = sys.argv[1]
 | 
				
			||||||
 | 
					            token_name = sys.argv[2]
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            token_name = "ETH"
 | 
					            token_name = "ETH"
 | 
				
			||||||
        process(token_name=token_name)
 | 
					        process(token_name=token_name)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user