diff --git a/packages/contracts-bedrock/package.json b/packages/contracts-bedrock/package.json index abf9248175b79..21859bac71774 100644 --- a/packages/contracts-bedrock/package.json +++ b/packages/contracts-bedrock/package.json @@ -6,10 +6,17 @@ "types": "dist/index", "license": "MIT", "files": [ - "dist/**/*.js", - "dist/**/*.d.ts", - "dist/types/**/*.ts", - "artifacts/contracts/**/*.json", + "forge-artifacts/L2StandardBridge.sol/L2StandardBridge.json", + "forge-artifacts/L1StandardBridge.sol/L1StandardBridge.json", + "forge-artifacts/L1CrossDomainMessenger.sol/L1CrossDomainMessenger.json", + "forge-artifacts/L2CrossDomainMessenger.sol/L2CrossDomainMessenger.json", + "forge-artifacts/OptimismPortal.sol/OptimismPortal.json", + "forge-artifacts/SystemConfig.sol/SystemConfig.json", + "forge-artifacts/SequencerFeeVault.sol/SequencerFeeVault.json", + "forge-artifacts/Proxy.sol/Proxy.json", + "forge-artifacts/ProxyAdmin.sol/ProxyAdmin.json", + "forge-artifacts/L2OutputOracle.sol/L2OutputOracle.json", + "forge-artifacts/OptimismMintableERC20.sol/OptimismMintableERC20.json", "deployments/**/*.json", "contracts/**/*.sol" ], diff --git a/packages/sdk/src/adapters/standard-bridge.ts b/packages/sdk/src/adapters/standard-bridge.ts index 486aa8720c87d..41e71c360385a 100644 --- a/packages/sdk/src/adapters/standard-bridge.ts +++ b/packages/sdk/src/adapters/standard-bridge.ts @@ -13,8 +13,10 @@ import { BlockTag, } from '@ethersproject/abstract-provider' import { predeploys } from '@eth-optimism/contracts' -import { getContractInterface } from '@eth-optimism/contracts-bedrock' import { hexStringEquals } from '@eth-optimism/core-utils' +import l1StandardBridgeArtifact from '@eth-optimism/contracts-bedrock/forge-artifacts/L1StandardBridge.sol/L1StandardBridge.json' +import l2StandardBridgeArtifact from '@eth-optimism/contracts-bedrock/forge-artifacts/L2StandardBridge.sol/L2StandardBridge.json' +import optimismMintableERC20 from '@eth-optimism/contracts-bedrock/forge-artifacts/OptimismMintableERC20.sol/OptimismMintableERC20.json' import { CrossChainMessenger } from '../cross-chain-messenger' import { @@ -50,12 +52,12 @@ export class StandardBridgeAdapter implements IBridgeAdapter { this.messenger = opts.messenger this.l1Bridge = new Contract( toAddress(opts.l1Bridge), - getContractInterface('L1StandardBridge'), + l1StandardBridgeArtifact.abi, this.messenger.l1Provider ) this.l2Bridge = new Contract( toAddress(opts.l2Bridge), - getContractInterface('L2StandardBridge'), + l2StandardBridgeArtifact.abi, this.messenger.l2Provider ) } @@ -157,7 +159,7 @@ export class StandardBridgeAdapter implements IBridgeAdapter { try { const contract = new Contract( toAddress(l2Token), - getContractInterface('OptimismMintableERC20'), + optimismMintableERC20.abi, this.messenger.l2Provider ) // Don't support ETH deposits or withdrawals via this bridge. @@ -207,7 +209,7 @@ export class StandardBridgeAdapter implements IBridgeAdapter { const token = new Contract( toAddress(l1Token), - getContractInterface('OptimismMintableERC20'), // Any ERC20 will do + optimismMintableERC20.abi, this.messenger.l1Provider ) @@ -274,7 +276,7 @@ export class StandardBridgeAdapter implements IBridgeAdapter { const token = new Contract( toAddress(l1Token), - getContractInterface('OptimismMintableERC20'), // Any ERC20 will do + optimismMintableERC20.abi, this.messenger.l1Provider ) diff --git a/packages/sdk/src/utils/chain-constants.ts b/packages/sdk/src/utils/chain-constants.ts index ec8f7248b34ef..ffd3dde3cee4d 100644 --- a/packages/sdk/src/utils/chain-constants.ts +++ b/packages/sdk/src/utils/chain-constants.ts @@ -23,7 +23,7 @@ const l2OutputOracleAddresses = { const addressManagerAddresses = { mainnet: addressManagerArtifactMainnet.address, - goerli: addressManagerArtifactGoerli.address + goerli: addressManagerArtifactGoerli.address, } const l1StandardBridgeAddresses = { @@ -39,13 +39,13 @@ const l1CrossDomainMessengerAddresses = { // legacy const stateCommitmentChainAddresses = { mainnet: '0xBe5dAb4A2e9cd0F27300dB4aB94BeE3A233AEB19', - goerli: '0x9c945aC97Baf48cB784AbBB61399beB71aF7A378' + goerli: '0x9c945aC97Baf48cB784AbBB61399beB71aF7A378', } // legacy const canonicalTransactionChainAddresses = { mainnet: '0x5E4e65926BA27467555EB562121fac00D24E9dD2', - goerli: '0x607F755149cFEB3a14E1Dc3A4E2450Cde7dfb04D' + goerli: '0x607F755149cFEB3a14E1Dc3A4E2450Cde7dfb04D', } import {