Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,3 @@ yarn-error.log*

# Snapshot
blockchain/

# Ouputs
deployments/outputs.ts
6 changes: 5 additions & 1 deletion artifacts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { WethMock } from "./ts/WethMock";
import { WhiteList } from "./ts/WhiteList";
import { ZeroExExchangeWrapper } from "./ts/ZeroExExchangeWrapper";


import { outputs } from "./outputs";

// Export abi-gen contract wrappers
export {
Expand Down Expand Up @@ -123,3 +123,7 @@ export {
ZeroExExchangeWrapper,
};

// Export the contract addresses
export {
outputs as Deployments
};
File renamed without changes.
8 changes: 4 additions & 4 deletions scripts/generate_outputs.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# To make it really easy to work with the outputs file from the manager,
# this script converts the JSON file into a typescript file

# Remove old transpiled outputs from the deployments/ directory
rm -f deployments/outputs.ts
# Remove old transpiled outputs from the artifacts/ directory
rm -f artifacts/outputs.ts

# Output a TS file from the generated JSON file

filename=outputs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does rm -f deployments/outputs.ts need to get updated too?

filename_base=$(basename $filename .json)
echo -e "export const $filename_base = " > "deployments/$filename_base.ts"
cat "deployments/$filename_base.json" >> "deployments/$filename_base.ts"
echo -e "export const $filename_base = " > "artifacts/$filename_base.ts"
cat "deployments/$filename_base.json" >> "artifacts/$filename_base.ts"