aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-03-06 08:31:39 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-03-06 08:31:39 +0800
commit61ad8d4c1055096c98075282514f8a6fad020acc (patch)
tree235a990de070e269e1dde2e1cd85fb1bbbee4210 /packages
parent38a4ccd9f24cd1cd583c17ebc200238e1770e5f8 (diff)
downloaddexon-sol-tools-61ad8d4c1055096c98075282514f8a6fad020acc.tar.gz
dexon-sol-tools-61ad8d4c1055096c98075282514f8a6fad020acc.tar.zst
dexon-sol-tools-61ad8d4c1055096c98075282514f8a6fad020acc.zip
Add comment to environment factory
Diffstat (limited to 'packages')
-rw-r--r--packages/sra-report/src/postman_environment_factory.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/sra-report/src/postman_environment_factory.ts b/packages/sra-report/src/postman_environment_factory.ts
index 7534baaaf..d32d41e18 100644
--- a/packages/sra-report/src/postman_environment_factory.ts
+++ b/packages/sra-report/src/postman_environment_factory.ts
@@ -7,12 +7,17 @@ import { addresses as mainnetAddresses} from './contract_addresses/mainnet_addre
interface EnvironmentValue {
key: string;
- value: string;
- enabled: boolean;
- type: string;
}
export const postmanEnvironmentFactory = {
+ /**
+ * Dynamically generates a postman environment (https://www.getpostman.com/docs/v6/postman/environments_and_globals/manage_environments)
+ * When running the postman collection via newman, we provide it a set of environment variables
+ * These variables include:
+ * - 0x JSON schemas for response body validation
+ * - Contract addresses based on the network id for making specific queries (ex. baseTokenAddress=ZRX_address)
+ * - Order properties for making specific queries (ex. maker=orderMaker)
+ */
createPostmanEnvironment(url: string, networkId: number, order: SignedOrder) {
const schemas: Schema[] = _.values(schemasByName);
const schemaEnvironmentValues = _.compact(