Commit f1f5bf2b authored by Liam Horne's avatar Liam Horne Committed by GitHub

refactor: rename deployments filenames to remove colons (#662)

* refactor: rename deployments filenames to remove colons

* build: add changeset
parent 46e00349
---
"@eth-optimism/contracts": patch
---
Updates deployment files to remove colon filenames
...@@ -75,11 +75,13 @@ const networks = { ...@@ -75,11 +75,13 @@ const networks = {
}); });
for (const contract of contracts) { for (const contract of contracts) {
const colonizedName = contract.split(':').join('-');
const deploymentInfo = require(`../deployments/${deployment}/${contract}.json`); const deploymentInfo = require(`../deployments/${deployment}/${contract}.json`);
const escPrefix = chainId !== 1 ? `${network}.` : ""; const escPrefix = chainId !== 1 ? `${network}.` : "";
const etherscanUrl = `https://${escPrefix}etherscan.io/address/${deploymentInfo.address}`; const etherscanUrl = `https://${escPrefix}etherscan.io/address/${deploymentInfo.address}`;
md += `|${contract}|[${deploymentInfo.address}](${etherscanUrl})|\n`; md += `|${colonizedName}|[${deploymentInfo.address}](${etherscanUrl})|\n`;
} }
md += `---\n`; md += `---\n`;
} }
......
...@@ -13,7 +13,7 @@ import { Interface } from 'ethers/lib/utils' ...@@ -13,7 +13,7 @@ import { Interface } from 'ethers/lib/utils'
export const getContractDefinition = (name: string, ovm?: boolean): any => { export const getContractDefinition = (name: string, ovm?: boolean): any => {
const match = glob.sync( const match = glob.sync(
path.resolve(__dirname, `../artifacts${ovm ? '-ovm' : ''}`) + path.resolve(__dirname, `../artifacts${ovm ? '-ovm' : ''}`) +
`/**/${name}.json` `/**/${name.split('-').join(':')}.json`
) )
if (match.length > 0) { if (match.length > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment