Skip to content

Commit

Permalink
Added coverage to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo Vazquez Amado committed Oct 12, 2022
1 parent 68909c8 commit efba121
Show file tree
Hide file tree
Showing 6 changed files with 305 additions and 165 deletions.
17 changes: 14 additions & 3 deletions bridge/contracts/CentralBridgeRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ contract CentralBridgeRouter is ICentralBridgeRouter, ImmutableFactory, Immutabl
//tracker to track number of deployed router versions
uint16 internal _routerVersions;

constructor() ImmutableFactory(msg.sender) {}
event DepositedERCToken(
address ercContract,
uint8 destinationAccountType, // 1 for secp256k1, 2 for bn128
address destinationAccount, //account to deposit the tokens to in alicenet
uint8 ercType,
uint256 number, // If fungible, this is the amount. If non-fungible, this is the id
uint256 chainID,
uint16 poolVersion,
uint256 nonce
);

constructor() ImmutableFactory(msg.sender) ImmutableBToken() {}

/**
* takes token deposit calls from ALCB and emits deposit events on token transfer completion
Expand Down Expand Up @@ -143,9 +154,9 @@ contract CentralBridgeRouter is ICentralBridgeRouter, ImmutableFactory, Immutabl
}
}

function _isValidVersion(uint16 version_) internal view returns (bool) {
/* function _isValidVersion(uint16 version_) internal view returns (bool) {
RouterConfig memory config = _routerConfig[version_];
if (config.routerAddress == address(0) || config.notOnline) return false;
return true;
}
} */
}
6 changes: 2 additions & 4 deletions bridge/contracts/utils/ImmutableAuth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -544,11 +544,9 @@ abstract contract ImmutableCentralBridgeRouter is ImmutableFactory {
}

constructor() {
_centralBridgeRouter = getMetamorphicContractAddress(
0x43656e7472616c427269646765526f7574657200000000000000000000000000,
_factoryAddress()
_centralBridgeRouter = IAliceNetFactory(_factoryAddress()).lookup(
_saltForCentralBridgeRouter()
);
// _centralBridgeRouter = IAliceNetFactory(_factoryAddress()).lookup(_saltForBToken());
}

function _centralBridgeRouterAddress() internal view returns (address) {
Expand Down
Loading

0 comments on commit efba121

Please sign in to comment.