Skip to content

Commit

Permalink
teleporter
Browse files Browse the repository at this point in the history
  • Loading branch information
godzillaba committed Oct 2, 2023
1 parent 58001fa commit ed2fac0
Show file tree
Hide file tree
Showing 6 changed files with 805 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/genAbi.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ async function main() {
const cwd = process.cwd()

const nitroPath = getPackagePath('@arbitrum/nitro-contracts')
const teleporterPath = getPackagePath('arb-teleporter') // TODO: just symlinked to the repo on my machine
const peripheralsPath = getPackagePath('@arbitrum/token-bridge-contracts')

console.log('Compiling paths.')
Expand All @@ -37,11 +38,17 @@ async function main() {
cwd: peripheralsPath,
})

console.log('building teleporter')
execSync(`${npmExec} run hardhat compile`, {
cwd: teleporterPath,
})

console.log('Done compiling')

const nitroFiles = glob(cwd, [
`${peripheralsPath}/build/contracts/!(build-info)/**/+([a-zA-Z0-9_]).json`,
`${nitroPath}/build/contracts/!(build-info)/**/+([a-zA-Z0-9_]).json`,
`${teleporterPath}/artifacts/!(build-info)/**/+([a-zA-Z0-9_]).json`,
])

// TODO: generate files into different subfolders (ie `/nitro/*`) to avoid overwrite of contracts with the same name
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/* eslint-env node */
'use strict'

export { TeleporterUtils } from './lib/assetBridger/teleporter'
export { EthBridger } from './lib/assetBridger/ethBridger'
export { Erc20Bridger } from './lib/assetBridger/erc20Bridger'
export {
Expand Down
Loading

0 comments on commit ed2fac0

Please sign in to comment.