Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hardhat reset #3

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
22 changes: 22 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint and tests
on: [push]

jobs:
build:
name: Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci
- run: npm run build

- name: Linter
run: npm run lint

- name: Test
run: npm run test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/dist
/typechain
/fixture-projects/**/typechain

# Logs
logs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@ import "@debridge-finance/contracts/contracts/interfaces/ICallProxy.sol";

import "./interfaces/ICrossChainCounter.sol";

/// @notice IDeBridgeGate interface doesn't contain a getter for the `callProxy` public variable, which is
/// defined in the `DeBridgeGate` contract, so we create a dummy interface solely for this getter
interface IDebridgeGateWithCallProxyGetter is IDeBridgeGate {
function callProxy() external returns (address);
}

contract CrossChainCounter is AccessControl, ICrossChainCounter {
/// @dev DeBridgeGate's address on the current chain
IDebridgeGateWithCallProxyGetter public deBridgeGate;
IDeBridgeGate public deBridgeGate;

/// @dev chains, where commands are allowed to come from
/// @dev chain_id_from => ChainInfo
Expand Down Expand Up @@ -62,7 +56,7 @@ contract CrossChainCounter is AccessControl, ICrossChainCounter {

/* ========== INITIALIZERS ========== */

constructor(IDebridgeGateWithCallProxyGetter deBridgeGate_) {
constructor(IDeBridgeGate deBridgeGate_) {
deBridgeGate = deBridgeGate_;
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ import "@debridge-finance/contracts/contracts/interfaces/IDeBridgeGate.sol";

import "./interfaces/ICrossChainCounter.sol";

interface IDeBridgeGateExtended is IDeBridgeGate {
function globalFixedNativeFee() external returns (uint);
}

contract CrossChainIncrementor {
/// @dev DeBridgeGate's address on the current chain
IDeBridgeGateExtended public deBridgeGate;
IDeBridgeGate public deBridgeGate;

/// @dev Chain ID where the cross-chain counter contract has been deployed
uint256 crossChainCounterResidenceChainID;
Expand All @@ -23,7 +19,7 @@ contract CrossChainIncrementor {
/* ========== INITIALIZERS ========== */

constructor(
IDeBridgeGateExtended deBridgeGate_,
IDeBridgeGate deBridgeGate_,
uint256 crossChainCounterResidenceChainID_,
address crossChainCounterResidenceAddress_
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require("@typechain/hardhat");
require("../../../src/index");
require("../../src/index");

/**
* @type import('hardhat/config').HardhatUserConfig
Expand Down
181 changes: 20 additions & 161 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading