Skip to content

Commit

Permalink
make proxy admin optional if not found in deployment logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gretzke committed Jan 9, 2025
1 parent 28c2f01 commit ad0b5f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async function extractAndSaveJson(scriptName, chainId, rpcUrl, force, broadcastD
const upgradeableItem = {
...upgradeableTemplate,
implementation: currentTransaction.contractAddress,
proxyAdmin: nextTransaction.additionalContracts[0].address,
proxyAdmin: nextTransaction.additionalContracts[0]?.address,
address: nextTransaction.contractAddress,
proxy: true,
version: await getVersion(nextTransaction.contractAddress, rpcUrl),
Expand Down
2 changes: 1 addition & 1 deletion generateMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function generateProxyInformationIfProxy({
out += `\n\n_Proxy Information_\n\n`;
out += `\n\nProxy Type: ${proxyType}\n\n`;
out += `\n\nImplementation: ${getEtherscanLinkMd(chainId, implementation)}\n\n`;
out += `\n\nProxy Admin: ${getEtherscanLinkMd(chainId, proxyAdmin)}\n\n`;
if (proxyAdmin) out += `\n\nProxy Admin: ${getEtherscanLinkMd(chainId, proxyAdmin)}\n\n`;

const historyOfProxy = history.filter((h) => h?.contracts[contractName]?.address === address);
if (historyOfProxy.length === 0) return out;
Expand Down

0 comments on commit ad0b5f6

Please sign in to comment.