-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #297 from reservoirprotocol/pedro/grwth-3082-list-…
…with-erc20-on-explorer List with erc20 on explorer
- Loading branch information
Showing
9 changed files
with
142 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
const { exec } = require('child_process') | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
async function listFilesInDirectory(directoryPath) { | ||
try { | ||
const files = await fs.readdir(directoryPath) | ||
return files | ||
} catch (err) { | ||
console.error('Error reading directory:', err) | ||
} | ||
} | ||
|
||
async function deleteAllFilesInDirectory(directoryPath) { | ||
try { | ||
const files = await fs.readdirSync(directoryPath) | ||
|
||
for (const file of files) { | ||
const filePath = path.join(directoryPath, file) | ||
await fs.unlinkSync(filePath) | ||
} | ||
return true | ||
} catch (err) { | ||
return true | ||
} | ||
} | ||
|
||
deleteAllFilesInDirectory('.cache').then(() => { | ||
exec( | ||
'tsc --module ES6 --outDir .cache ./utils/chains.ts', | ||
(error, stdout, stderr) => { | ||
const processFiles = async () => { | ||
const files = fs.readdirSync('.cache') | ||
for (fileId in files) { | ||
const file = files[fileId] | ||
if (file.endsWith('.js')) { | ||
const originalPath = path.join('.cache', file) | ||
const fileContents = await fs.readFileSync(originalPath, 'utf-8') | ||
let modifiedContents = fileContents | ||
files.forEach((filename) => { | ||
const filenameWithoutExt = `./${filename.replace('.js', "'")}` | ||
modifiedContents = modifiedContents.replace( | ||
filenameWithoutExt, | ||
`${filenameWithoutExt.replace("'", '')}.mjs'` | ||
) | ||
}) | ||
await fs.writeFileSync(originalPath, modifiedContents, 'utf-8') | ||
const newPath = path.join('.cache', file.replace(/\.js$/, '.mjs')) | ||
await fs.renameSync(originalPath, newPath) | ||
} | ||
} | ||
} | ||
processFiles() | ||
} | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const usdcContracts: Record<number, string> = { | ||
1: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', //mainnet | ||
5: '0x07865c6e87b9f70255377e024ace6630c1eaa37f', //goerli | ||
10: '0x7f5c764cbc14f9669b88837ca1490cca17c31607', //optimism | ||
56: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d', //bnb | ||
137: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', //polygon | ||
42161: '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', //arbitrum | ||
80001: '0x0fa8781a83e46826621b3bc094ea2a0212e71b23', //mumbai | ||
} | ||
|
||
export default usdcContracts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3015,11 +3015,6 @@ commander@^2.20.3: | |
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" | ||
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== | ||
|
||
[email protected]: | ||
version "1.3.1" | ||
resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.3.1.tgz#3d7ea3adaf9345594aedee6563f422348f165c1b" | ||
integrity sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA== | ||
|
||
commondir@^1.0.1: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" | ||
|
@@ -4413,11 +4408,6 @@ openapi-typescript-fetch@^1.1.3: | |
resolved "https://registry.yarnpkg.com/openapi-typescript-fetch/-/openapi-typescript-fetch-1.1.3.tgz#354e6803b7885c7142ae11adc1b758afafd8aa2e" | ||
integrity sha512-smLZPck4OkKMNExcw8jMgrMOGgVGx2N/s6DbKL2ftNl77g5HfoGpZGFy79RBzU/EkaO0OZpwBnslfdBfh7ZcWg== | ||
|
||
[email protected]: | ||
version "2.0.40" | ||
resolved "https://registry.yarnpkg.com/options-defaults/-/options-defaults-2.0.40.tgz#18a1521519e68e561e2267a3dcb409f2fba81510" | ||
integrity sha512-a0oW0AMaP/Uqk1gU7s3unE83wzs/MACy3wsCnNREn4wqp4KCcxRdulRjf0d2FeIxENbGJ4EBGtHTQ6J30XB6Cw== | ||
|
||
outdent@^0.8.0: | ||
version "0.8.0" | ||
resolved "https://registry.yarnpkg.com/outdent/-/outdent-0.8.0.tgz#2ebc3e77bf49912543f1008100ff8e7f44428eb0" | ||
|
@@ -5098,25 +5088,11 @@ trough@^2.0.0: | |
resolved "https://registry.yarnpkg.com/trough/-/trough-2.1.0.tgz#0f7b511a4fde65a46f18477ab38849b22c554876" | ||
integrity sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g== | ||
|
||
ts-import@^5.0.0-beta.0: | ||
version "5.0.0-beta.0" | ||
resolved "https://registry.yarnpkg.com/ts-import/-/ts-import-5.0.0-beta.0.tgz#07ed5d07df23dc64e6e25dd30b6fdd8bfc2bf0ba" | ||
integrity sha512-YOe/xCmwDWughfeaAaGJ4UWzlCKNnt9e+oda3St6mUMkRJCTBhBso+7XApIijw7Mr9SS6NLOdav8i5EJrx7UVQ== | ||
dependencies: | ||
comment-parser "1.3.1" | ||
options-defaults "2.0.40" | ||
tslib "2.5.0" | ||
|
||
[email protected], tslib@^1.9.0, tslib@^1.9.3: | ||
version "1.14.1" | ||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" | ||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== | ||
|
||
[email protected]: | ||
version "2.5.0" | ||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" | ||
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== | ||
|
||
tslib@^2.0.0, tslib@^2.1.0, tslib@^2.3.1: | ||
version "2.5.2" | ||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338" | ||
|
e84536a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
artblocks-v2 – ./
artblocks-v2-git-main-unevenlabs.vercel.app
artblocks-v2-unevenlabs.vercel.app
artblocks-v2.vercel.app
e84536a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
explorer – ./
explorer-git-main-unevenlabs.vercel.app
marketplace.reservoir.tools
explorer.reservoir.tools
explorer-unevenlabs.vercel.app
testnets-marketplace.reservoir.tools