Skip to content

Commit

Permalink
chore: markdown generation for upgradable contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybuidl committed Sep 26, 2023
1 parent c5104cb commit 0a1642f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions contracts/scripts/generateDeploymentsMarkdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
function generate() { #deploymentDir #explorerUrl
deploymentDir=$1
explorerUrl=$2
for f in $(ls -1 $deploymentDir/*.json 2>/dev/null | grep -v "PNK.json\|MetaEvidence_*\|CREATE3Factory.json" | sort); do
for f in $(ls -1 $deploymentDir/*.json 2>/dev/null | grep -v "PNK.json\|MetaEvidence_*\|CREATE3Factory.json\|_Proxy.json\|_Implementation.json" | sort); do
contractName=$(basename $f .json)
address=$(cat $f | jq -r .address)
echo "- [$contractName]($explorerUrl$address)"
implementation=$(cat $f | jq -r .implementation)

if [ "$implementation" != "null" ]; then
echo "- [$contractName: proxy]($explorerUrl$address), [implementation]($explorerUrl$implementation)"
else
echo "- [$contractName]($explorerUrl$address)"
fi
done
}

Expand Down

0 comments on commit 0a1642f

Please sign in to comment.