From 54e23ea9af399c84b1fc9a33a64e12cd4c0f9b36 Mon Sep 17 00:00:00 2001 From: Ethan Date: Mon, 16 Dec 2019 18:00:23 -0500 Subject: [PATCH] Add multicall address to output installation script --- packages/dai/contracts/addresses/testnet.json | 3 ++- packages/dai/scripts/install-testchain-outputs.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/dai/contracts/addresses/testnet.json b/packages/dai/contracts/addresses/testnet.json index c20d6b54b..bfaed1756 100644 --- a/packages/dai/contracts/addresses/testnet.json +++ b/packages/dai/contracts/addresses/testnet.json @@ -25,5 +25,6 @@ "OLD_CHIEF": "0xe50ff8544b50e2e0f25cab27bc85a7a905d5671a", "OLD_IOU": "0x3be5c78f206f1de8766cfcdfd8f09a6995cd89ec", "POLLING": "0x33bbcca25638d046c754987a45f7cba6a73b1fd4", - "OLD_VOTE_PROXY_FACTORY": "0x17d4edea99fad126ce0b3ed46646587d067f4f8c" + "OLD_VOTE_PROXY_FACTORY": "0x17d4edea99fad126ce0b3ed46646587d067f4f8c", + "MULTICALL": "0x6dbff82b7b650ac3892dde048456804e5c1a7a47" } diff --git a/packages/dai/scripts/install-testchain-outputs.sh b/packages/dai/scripts/install-testchain-outputs.sh index 7acaaabc2..688707b66 100755 --- a/packages/dai/scripts/install-testchain-outputs.sh +++ b/packages/dai/scripts/install-testchain-outputs.sh @@ -5,8 +5,16 @@ CWD=`dirname $0` CONTRACTS=$CWD/../contracts SOURCE=${1:-$CWD/../../../node_modules/@makerdao/testchain} +function jq_inplace { + TMP=$(mktemp) + jq "$1" > $TMP && mv $TMP "$2" +} + for file in $SOURCE/out/*.abi; do cp $file $CONTRACTS/abis/$(basename $file .abi).json done cp $SOURCE/out/addresses.json $CONTRACTS/addresses/testnet.json +MULTICALL=$(cat $SOURCE/out/addresses-mcd.json | jq '.MULTICALL') + +cat $CONTRACTS/addresses/testnet.json | jq_inplace ".MULTICALL = $(echo $MULTICALL)" $CONTRACTS/addresses/testnet.json