Skip to content

Commit

Permalink
Remove AcreBitcoinDepositorHarness contract
Browse files Browse the repository at this point in the history
We no longer need to define the test contract to expose internal
functions so we remove it also from the deployment scripts.
  • Loading branch information
nkuba committed Apr 3, 2024
1 parent 037d76c commit 81bdf8d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
11 changes: 0 additions & 11 deletions core/contracts/test/AcreBitcoinDepositorHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ import {IBridgeTypes} from "@keep-network/tbtc-v2/contracts/integrator/IBridge.s

import {TestERC20} from "./TestERC20.sol";

/// @dev A test contract to expose internal function from AcreBitcoinDepositor contract.
/// This solution follows Foundry recommendation:
/// https://book.getfoundry.sh/tutorials/best-practices#internal-functions
contract AcreBitcoinDepositorHarness is AcreBitcoinDepositor {
function exposed_finalizeBridging(
uint256 depositKey
) external returns (uint256 amountToStake, address staker) {
return finalizeBridging(depositKey);
}
}

/// @dev A test contract to stub tBTC Bridge contract.
contract BridgeStub is MockBridge {}

Expand Down
4 changes: 0 additions & 4 deletions core/deploy/03_deploy_acre_bitcoin_depositor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const [, acreBitcoinDepositorDeployment] = await helpers.upgrades.deployProxy(
"AcreBitcoinDepositor",
{
contractName:
process.env.HARDHAT_TEST === "true"
? "AcreBitcoinDepositorHarness"
: "AcreBitcoinDepositor",
factoryOpts: {
signer: deployer,
},
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"lint:sol:fix": "solhint 'contracts/**/*.sol' --fix && prettier --write 'contracts/**/*.sol'",
"lint:config": "prettier --check '**/*.@(json)'",
"lint:config:fix": "prettier --write '**/*.@(json)'",
"test": "HARDHAT_TEST=true hardhat test"
"test": "hardhat test"
},
"devDependencies": {
"@keep-network/hardhat-helpers": "^0.7.1",
Expand Down

0 comments on commit 81bdf8d

Please sign in to comment.