Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAshish committed Dec 11, 2018
1 parent 59496cb commit 6273fdf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 29 deletions.
27 changes: 0 additions & 27 deletions contracts/proofs/DepositValidator.sol
Expand Up @@ -183,7 +183,6 @@ contract DepositValidator is RootChainValidator {
items.length == 4 &&
items[3].toList().length == 3 &&
_validateDataField(depositCount, rootToken, depositor, amount) &&
// _validateDepositEvent(items[3].toList()[0].toList(), rootToken, childToken, depositor, amount) &&
_validateDepositEvent(items[3].toList()[1].toList(), rootToken, childToken, depositor, amount) &&
_validateTokenDepositedEvent(items[3].toList()[2].toList(), rootToken, childToken, depositor, amount)
) {
Expand Down Expand Up @@ -216,32 +215,6 @@ contract DepositValidator is RootChainValidator {
return false;
}

// function _validateDepositEvent(
// RLP.RLPItem[] items,
// address rootToken,
// address childToken,
// address depositor,
// uint256 amount
// ) internal returns (bool) {
// if (items.length != 3) {
// return false;
// }

// RLP.RLPItem[] memory topics = items[1].toList();
// if (
// topics.length == 3 &&
// items[0].toAddress() == childToken &&
// topics[0].toBytes32() == DEPOSIT_EVENT_SIGNATURE &&
// BytesLib.toAddress(topics[1].toData(), 12) == rootToken &&
// BytesLib.toAddress(topics[2].toData(), 12) == depositor &&
// BytesLib.toUint(items[2].toData(), 0) == amount
// ) {
// return true;
// }

// return false;
// }

function _validateDepositEvent(
RLP.RLPItem[] items,
address rootToken,
Expand Down
1 change: 0 additions & 1 deletion contracts/token/MaticWETH.sol
Expand Up @@ -24,7 +24,6 @@ contract MaticWETH is WETH {
require(balanceOf(msg.sender)>= wad);
user.transfer(wad);
_burn(msg.sender, wad);

emit Withdrawal(user, wad);
}
}
2 changes: 1 addition & 1 deletion test/proofs/ExitValidator.test.js
Expand Up @@ -104,7 +104,7 @@ contract('ExitValidator', async function(accounts) {
rootChain = await RootChainMock.new(rootToken.address) // dummy address for stakemanager
depositManager = await DepositManagerMock.new({ from: owner })
withdrawManager = await WithdrawManagerMock.new({ from: owner })

await exitValidator.changeRootChain(rootChain.address, { from: owner })

childBlockInterval = await withdrawManager.CHILD_BLOCK_INTERVAL()
Expand Down

0 comments on commit 6273fdf

Please sign in to comment.