Skip to content

Commit

Permalink
Fix path references to contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
elenadimitrova authored and smartcontracts committed Nov 10, 2021
1 parent 2bc7dbc commit 75d52ad
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Our primary development branch is [`develop`](https://github.com/ethereum-optimi
`develop` contains the most up-to-date software that remains backwards compatible with our latest experimental [network deployments](https://community.optimism.io/docs/developers/networks.html).
If you're making a backwards compatible change, please direct your pull request towards `develop`.

**Changes to contracts within `packages/contracts/contracts/optimistic-ethereum` are usually NOT considered backwards compatible and SHOULD be made against a release candidate branch**.
**Changes to contracts within `packages/contracts/contracts` are usually NOT considered backwards compatible and SHOULD be made against a release candidate branch**.
Some exceptions to this rule exist for cases in which we absolutely must deploy some new contract after a release candidate branch has already been fully deployed.
If you're changing or adding a contract and you're unsure about which branch to make a PR into, default to using the latest release candidate branch.
See below for info about release candidate branches.
Expand All @@ -247,7 +247,7 @@ Developers can release new versions of the software by adding changesets to thei
### Release candidate branches

Branches marked `regenesis/X.X.X` are **release candidate branches**.
Changes that are not backwards compatible and all changes to contracts within `packages/contracts/contracts/optimistic-ethereum` MUST be directed towards a release candidate branch.
Changes that are not backwards compatible and all changes to contracts within `packages/contracts/contracts` MUST be directed towards a release candidate branch.
Release candidates are merged into `develop` and then into `master` once they've been fully deployed.
We may sometimes have more than one active `regenesis/X.X.X` branch if we're in the middle of a deployment.
See table in the **Active Branches** section above to find the right branch to target.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ganache from 'ganache-core'
import sinon from 'sinon'
import { Web3Provider } from '@ethersproject/providers'

import scc from '@eth-optimism/contracts/artifacts/contracts/optimistic-ethereum/OVM/chain/OVM_StateCommitmentChain.sol/OVM_StateCommitmentChain.json'
import scc from '@eth-optimism/contracts/artifacts/contracts/L1/rollup/OVM_StateCommitmentChain.sol/OVM_StateCommitmentChain.json'
import { getContractInterface, predeploys } from '@eth-optimism/contracts'
import { smockit, MockContract } from '@eth-optimism/smock'

Expand Down
3 changes: 1 addition & 2 deletions packages/contracts/.solcover.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module.exports = {
skipFiles: [
'./test-helpers',
'./test-libraries',
'./optimistic-ethereum/mockOVM'
'./test-libraries'
],
mocha: {
grep: "@skip-on-coverage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { predeploys } from '../src/predeploys'
import { NON_ZERO_ADDRESS } from '../test/helpers/constants'
import { getContractFactory } from '../src/contract-defs'

import l1StandardBridgeJson from '../artifacts/contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1StandardBridge.sol/OVM_L1StandardBridge.json'
import l1StandardBridgeJson from '../artifacts/contracts/L1/messaging/OVM_L1StandardBridge.sol/OVM_L1StandardBridge.json'

const deployFn: DeployFunction = async (hre) => {
const { deploy } = hre.deployments
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"posttest:slither": "rm -f @openzeppelin && rm -f @ens && rm -f hardhat",
"lint:check": "eslint .",
"lint:fix": "yarn lint:check --fix",
"lint:contracts": "yarn solhint -f table contracts/optimistic-ethereum/**/*.sol",
"lint:contracts": "yarn solhint -f table contracts/**/*.sol",
"clean": "rm -rf ./dist ./artifacts ./cache ./tsconfig.build.tsbuildinfo",
"deploy": "ts-node \"./bin/deploy.ts\" && yarn generate:markdown",
"serve": "./bin/serve_dump.sh",
"prepublishOnly": "yarn copyfiles -u 2 \"contracts/optimistic-ethereum/**/*\" ./",
"prepublishOnly": "yarn copyfiles -u 1 -e \"**/test-*/**/*\" \"contracts/**/*\" ./",
"postpublish": "rimraf OVM iOVM libraries mockOVM",
"prepack": "yarn prepublishOnly",
"postpack": "yarn postpublish",
Expand Down
12 changes: 6 additions & 6 deletions packages/contracts/src/contract-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ export const getL1ContractData = (network: Network) => {
}
}

const OVM_ETH = require('../artifacts/contracts/optimistic-ethereum/OVM/predeploys/OVM_ETH.sol/OVM_ETH.json')
const OVM_L2CrossDomainMessenger = require('../artifacts/contracts/optimistic-ethereum/OVM/bridge/messaging/OVM_L2CrossDomainMessenger.sol/OVM_L2CrossDomainMessenger.json')
const OVM_L2ToL1MessagePasser = require('../artifacts/contracts/optimistic-ethereum/OVM/predeploys/OVM_L2ToL1MessagePasser.sol/OVM_L2ToL1MessagePasser.json')
const OVM_L1MessageSender = require('../artifacts/contracts/optimistic-ethereum/OVM/predeploys/OVM_L1MessageSender.sol/OVM_L1MessageSender.json')
const OVM_DeployerWhitelist = require('../artifacts/contracts/optimistic-ethereum/OVM/predeploys/OVM_DeployerWhitelist.sol/OVM_DeployerWhitelist.json')
const Lib_AddressManager = require('../artifacts/contracts/optimistic-ethereum/libraries/resolver/Lib_AddressManager.sol/Lib_AddressManager.json')
const OVM_ETH = require('../artifacts/contracts/L2/predeploys/OVM_ETH.sol/OVM_ETH.json')
const OVM_L2CrossDomainMessenger = require('../artifacts/contracts/L2/messaging/OVM_L2CrossDomainMessenger.sol/OVM_L2CrossDomainMessenger.json')
const OVM_L2ToL1MessagePasser = require('../artifacts/contracts/L2/predeploys/OVM_L2ToL1MessagePasser.sol/OVM_L2ToL1MessagePasser.json')
const OVM_L1MessageSender = require('../artifacts/contracts/L2/predeploys/OVM_L1MessageSender.sol/OVM_L1MessageSender.json')
const OVM_DeployerWhitelist = require('../artifacts/contracts/L2/predeploys/OVM_DeployerWhitelist.sol/OVM_DeployerWhitelist.json')
const Lib_AddressManager = require('../artifacts/contracts/libraries/resolver/Lib_AddressManager.sol/Lib_AddressManager.json')

export const getL2ContractData = () => {
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/message-relayer/src/relay-tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export const getMessagesAndProofsForL2Transaction = async (
// We need to calculate the specific storage slot that demonstrates that this message was
// actually included in the L2 chain. The following calculation is based on the fact that
// messages are stored in the following mapping on L2:
// https://github.com/ethereum-optimism/optimism/blob/c84d3450225306abbb39b4e7d6d82424341df2be/packages/contracts/contracts/optimistic-ethereum/OVM/predeploys/OVM_L2ToL1MessagePasser.sol#L23
// https://github.com/ethereum-optimism/optimism/blob/c84d3450225306abbb39b4e7d6d82424341df2be/packages/contracts/contracts/L2/predeploys/OVM_L2ToL1MessagePasser.sol#L23
// You can read more about how Solidity storage slots are computed for mappings here:
// https://docs.soliditylang.org/en/v0.8.4/internals/layout_in_storage.html#mappings-and-dynamic-arrays
const messageSlot = ethers.utils.keccak256(
Expand Down
2 changes: 1 addition & 1 deletion specs/protocol/components/accounts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Accounts

This document is a WIP. It is kept here to maintain a consistent structure mirroring the [implementation directory](../../../contracts/contracts/optimistic-ethereum/OVM/).
This document is a WIP. It is kept here to maintain a consistent structure mirroring the [implementation directory](../../../contracts/contracts/).

<!--
### ProxyEOAs
Expand Down
2 changes: 1 addition & 1 deletion specs/protocol/components/verification.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Fraud Proving

This document is a WIP. It is kept here to maintain a consistent structure mirroring the [implementation directory](../../../contracts/contracts/optimistic-ethereum/OVM/).
This document is a WIP. It is kept here to maintain a consistent structure mirroring the [implementation directory](../../../contracts/contracts/).

0 comments on commit 75d52ad

Please sign in to comment.