@0x/contracts-asset-proxy: Address review comments.

This commit is contained in:
Lawrence Forman 2020-03-05 14:26:15 -05:00
parent c3d4c13936
commit 2d7cb63c7b
7 changed files with 1 additions and 29 deletions

View File

@ -70,16 +70,6 @@ contract ChaiBridge is
// This will never fail if the `draw` call was successful
IERC20Token(_getDaiAddress()).transfer(to, amount);
emit ERC20BridgeTransfer(
address(this),
_getChaiAddress(),
_getDaiAddress(),
// draw() can change the rate so this is tricky to compute.
0,
amount,
from,
to
);
return BRIDGE_SUCCESS;
}
}

View File

@ -99,7 +99,6 @@ contract CurveBridge is
LibERC20Token.transfer(toTokenAddress, to, toTokenBalance);
emit ERC20BridgeTransfer(
address(this),
fromTokenAddress,
toTokenAddress,
fromTokenBalance,

View File

@ -44,14 +44,13 @@ contract DydxBridge is
/// 5. Withdrawals from dydx are made to the `to` address.
/// 6. Calling this function must always withdraw at least `amount`,
/// otherwise the `ERC20Bridge` will revert.
/// @param toTokenAddress The token to be withdrawn.
/// @param from The sender of the tokens and owner of the dydx account.
/// @param to The recipient of the tokens.
/// @param amount Minimum amount of `toTokenAddress` tokens to deposit or withdraw.
/// @param encodedBridgeData An abi-encoded `BridgeData` struct.
/// @return success The magic bytes if successful.
function bridgeTransferFrom(
address toTokenAddress,
address, /* toTokenAddress */
address from,
address to,
uint256 amount,
@ -83,17 +82,6 @@ contract DydxBridge is
// Run operation. This will revert on failure.
IDydx(_getDydxAddress()).operate(accounts, actions);
emit ERC20BridgeTransfer(
address(this),
// The from token isn't necessarily clear since we can have zero
// or more deposits.
address(0),
toTokenAddress,
0,
amount,
from,
to
);
return BRIDGE_SUCCESS;
}

View File

@ -72,7 +72,6 @@ contract Eth2DaiBridge is
LibERC20Token.transfer(toTokenAddress, to, boughtAmount);
emit ERC20BridgeTransfer(
address(this),
fromTokenAddress,
toTokenAddress,
fromTokenBalance,

View File

@ -150,7 +150,6 @@ contract KyberBridge is
}
emit ERC20BridgeTransfer(
address(this),
state.fromTokenAddress == KYBER_ETH_ADDRESS ? address(state.weth) : state.fromTokenAddress,
toTokenAddress,
state.fromTokenBalance,

View File

@ -148,7 +148,6 @@ contract UniswapBridge is
}
emit ERC20BridgeTransfer(
address(this),
fromTokenAddress,
toTokenAddress,
state.fromTokenBalance,

View File

@ -22,7 +22,6 @@ pragma solidity ^0.5.9;
contract IERC20Bridge {
/// @dev Emitted when a bridge transfer is completed.
/// @param bridge The bridge address.
/// @param fromToken The address of the "from" token.
/// @param toToken The address of the "to" token.
/// @param fromTokenAmount The "from" token amount consumed.
@ -30,7 +29,6 @@ contract IERC20Bridge {
/// @param from Supplier of "fromToken".
/// @param to Receiver of "toToken".
event ERC20BridgeTransfer(
address indexed bridge,
address fromToken,
address toToken,
uint256 fromTokenAmount,