Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/testhardhat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Main CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]


jobs:
lint-and-test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: ./package-lock.json
- run: npm install
- run: npx hardhat test
4 changes: 2 additions & 2 deletions contracts/ForkableBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ contract ForkableBridge is
}

/**
* @dev Allows the forkmanager to take out the forkonomic tokens
* @dev Allows aynone to take out their forkonomic tokens
* and send them to the children-bridge contracts
* Notice that forkonomic tokens are special, as they their main contract
* is on L1, but they are still forkable tokens as all the tokens from
Expand All @@ -185,7 +185,7 @@ contract ForkableBridge is
uint256 amount,
bool useFirstChild,
bool useChildTokenAllowance
) public onlyForkManger onlyAfterForking {
) public onlyAfterForking {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since all tokens are no longer accessible in the old bridge contract and they need to be withdrawn in the new contract, I think its fine if everyone can push them to the new chain. But I will rework this in one of my next PRs anyway

BridgeAssetOperations.sendForkonomicTokensToChild(
gasTokenAddress,
amount,
Expand Down
11 changes: 2 additions & 9 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,9 @@ require('@nomiclabs/hardhat-etherscan');
require('@openzeppelin/hardhat-upgrades');
require('hardhat-dependency-compiler');
require('hardhat-preprocessor');
const fs = require('fs');

const DEFAULT_MNEMONIC = 'test test test test test test test test test test test junk';

function getRemappings() {
return fs
.readFileSync('remappings.txt', 'utf8')
.split('\n')
.filter(Boolean) // remove empty lines
.map((line) => line.trim().split('='));
}

/*
* You need to export an object to set up your config
* Go to https://hardhat.org/config/ to learn more
Expand All @@ -40,6 +31,8 @@ module.exports = {
'@RealityETH/zkevm-contracts/contracts/mocks/PolygonZkEVMMock.sol',
'@RealityETH/zkevm-contracts/contracts/verifiers/FflonkVerifier.sol',
'@RealityETH/zkevm-contracts/contracts/PolygonZkEVMBridgeWrapper.sol',
'test/testcontract/ForkableExitMock.sol',
'test/testcontract/ForkableZkEVMMock.sol',
],
keep: true,
},
Expand Down
Loading