End-to-end demos of constructing and signing an order and submitting it to a Relayer. Docs are generated from the code, and include usage examples that are verified through automated testing.
		
			
				
	
	
		
			27 lines
		
	
	
		
			648 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			648 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env python
 | |
| 
 | |
| """Run a command in every package, in order of increasing dependency."""
 | |
| 
 | |
| import os
 | |
| import subprocess
 | |
| import sys
 | |
| 
 | |
| 
 | |
| PACKAGE_DEPENDENCY_LIST = [
 | |
|     # Order matters!  Packages must be handled in dependency order (most
 | |
|     # independent first) in order for them to resolve properly.
 | |
|     "contract_addresses",
 | |
|     "contract_artifacts",
 | |
|     "contract_wrappers",
 | |
|     "json_schemas",
 | |
|     "sra_client",
 | |
|     "order_utils",
 | |
|     "middlewares",
 | |
| ]
 | |
| 
 | |
| for package in PACKAGE_DEPENDENCY_LIST:
 | |
|     print(f"Running command `{sys.argv[1:]}` in package {package}")
 | |
|     os.chdir(package)
 | |
|     subprocess.check_call(sys.argv[1:])
 | |
|     os.chdir("..")
 |