aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sra-report
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sra-report')
-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(