Skip to content

Commit

Permalink
Move contracts dir
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeddes committed Jul 28, 2023
1 parent ed01e3f commit 523fef9
Show file tree
Hide file tree
Showing 25 changed files with 52 additions and 253 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ethereum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ jobs:
working-directory: core
run: pnpm install --frozen-lockfile
- name: Test
working-directory: core/packages/contracts
working-directory: contracts
run: forge test
- name: Coverage
working-directory: core/packages/contracts
working-directory: contracts
run: forge coverage --report=lcov --via-ir
- name: Lint
working-directory: core/packages/contracts
working-directory: contracts
run: pnpm lint
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
working-directory: core/packages/contracts
working-directory: contracts
files: lcov.info
flags: solidity
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ node_modules/
.envrc
parachain/build_rs_cov.profraw
compiler_config.json
core/packages/contracts/beefy-state.json
contracts/beefy-state.json

go/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Off-chain relayer services for relaying messages between Polkadot and Ethereum.

### Contracts

Ethereum contracts and unit tests. See [core/packages/contracts/README.md](core/packages/contracts/README.md)
Ethereum contracts and unit tests. See [contracts/README.md](contracts/README.md)

### Integration Tests

Expand Down
2 changes: 1 addition & 1 deletion _typos.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[files]
extend-exclude = [
"core/packages/contracts/lib",
"contracts/lib",
"**/*.yaml",
"**/*.json",
"**/fixtures/*.js",
Expand Down
12 changes: 6 additions & 6 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ coverage:
github_checks:
annotations: false
ignore:
- "core/packages/contracts/test/mocks"
- "core/packages/contracts/src/utils"
- "core/packages/contracts/src/ScaleCodec.sol"
- "core/packages/contracts/src/SubstrateTypes.sol"
- "contracts/test/mocks"
- "contracts/src/utils"
- "contracts/src/ScaleCodec.sol"
- "contracts/src/SubstrateTypes.sol"
- "parachain/tools"
- "parachain/pallets/ethereum-beacon-client/src/benchmarking"
- "parachain/pallets/ethereum-beacon-client/src/weights.rs"
- "core/packages/contracts/src/DeployScript.sol"
- "contracts/src/DeployScript.sol"
flags:
solidity:
paths:
- core/packages/contracts
- contracts
carryforward: true
rust:
paths:
Expand Down
3 changes: 1 addition & 2 deletions core/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ echo "Installing sszgen"
go install github.com/ferranbt/fastssz/sszgen@latest

echo "Initialize foundry libraries"
(cd packages/contracts && forge install)

(cd ../contracts && forge install)
2 changes: 1 addition & 1 deletion core/packages/test-helpers/src/generateBeefyCheckpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function generateBeefyCheckpoint() {
const beefyStartBlock = process.env.BEEFY_START_BLOCK
? parseInt(process.env.BEEFY_START_BLOCK)
: 1
const basedir = process.env.contract_dir || "../contracts"
const basedir = process.env.contract_dir || "../../../contracts"
const BeefyStateFile = path.join(basedir, "beefy-state.json")

const api1 = await ApiPromise.create({
Expand Down
2 changes: 1 addition & 1 deletion core/packages/test-helpers/src/generateBeefyTestFixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import fs from "fs"
const encoder = new ethers.utils.AbiCoder()

const run = async () => {
const basedir = process.env.contract_dir || "../contracts"
const basedir = process.env.contract_dir || "../../../contracts"
const fixtureData = JSON.parse(
fs.readFileSync(path.join(basedir, "test/data/beefy-commitment.json"), "utf8")
)
Expand Down
2 changes: 1 addition & 1 deletion core/packages/test/scripts/set-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ core_dir="$root_dir/core"
lodestar_version="${LODESTAR_VER:-1.8.0}"
geth_version="${GETH_VER:-v1.12.0}"
geth_dir="$root_dir/../go-ethereum/$geth_version"
export contract_dir="$core_dir/packages/contracts"
export contract_dir="$root_dir/contracts"
test_helpers_dir="$core_dir/packages/test-helpers"
relay_dir="$root_dir/relayer"
relay_bin="$relay_dir/build/snowbridge-relay"
Expand Down
Loading

0 comments on commit 523fef9

Please sign in to comment.