From 79bd9b46c17eabb2f39ba082e10feae827356331 Mon Sep 17 00:00:00 2001 From: mfw78 <53399572+mfw78@users.noreply.github.com> Date: Tue, 20 Aug 2024 06:21:16 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Federico Giacon <58218759+fedgiac@users.noreply.github.com> --- dev/generate-network-files.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dev/generate-network-files.sh b/dev/generate-network-files.sh index f3fa438..b6d5663 100755 --- a/dev/generate-network-files.sh +++ b/dev/generate-network-files.sh @@ -19,6 +19,7 @@ for deployment in "$repo_root_dir/broadcast/"*"/"*"/"*".json"; do done \ | # Then, all these single-contract single-chain-id networks.jsons are merged. Note: in case the same contract is # deployed twice in the same script run, the last deployed contract takes priority. - jq --sort-keys --null-input 'reduce inputs as $item ({}; . *= $item)' - -# Todo: handle case where the same contract is deployed on multiple chains. \ No newline at end of file + # If the same contract is deployed twice in different runs, the address in the file path that comes latest in + # alphabetical order takes priority. For example, a contract in `broadcast/Deployment10/*` is overwritten by + # one with the same name from `broadcast/Deployment2/*`. + jq --sort-keys --null-input 'reduce inputs as $item ({}; . *= $item)' \ No newline at end of file