Skip to content

Commit daad8cb

Browse files
committed
fix: cleanup
1 parent 2627893 commit daad8cb

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

contracts/MockRecipient.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ contract MockRecipient is IERC677Receiver {
1616
console.log("Amount", _value);
1717
console.log("With data", string(_data));
1818
txCount += 1;
19-
// revert if passed "err"
20-
require(keccak256(_data) != keccak256("err"));
19+
require(keccak256(_data) != keccak256("err")); // for testing: revert if passed "err"
2120
}
2221
}
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity 0.8.6;
33

4-
import "hardhat/console.sol";
5-
import "./IERC677Receiver.sol";
6-
7-
/**
8-
just a blank contract that doesnt implement onTokensTransferred
9-
*/
4+
/** Just a blank contract that doesnt implement onTokensTransferred */
105
contract MockRecipientNotERC677Receiver {
116
uint public x = 1;
12-
}
7+
}

contracts/MockRecipientReturnBool.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pragma solidity 0.8.6;
33

44
import "hardhat/console.sol";
55

6+
/** ERC677 recipient that returns false for error instead of reverting */
67
contract MockRecipientReturnBool {
78
uint public txCount;
89

@@ -15,8 +16,7 @@ contract MockRecipientReturnBool {
1516
console.log("Amount", _value);
1617
console.log("With data", string(_data));
1718
txCount += 1;
18-
// return false if passed "err"
19-
bool retval = keccak256(_data) != keccak256("err");
19+
bool retval = keccak256(_data) != keccak256("err"); // for testing: return false if passed "err"
2020
console.log("retval", retval);
2121
return retval;
2222
}

0 commit comments

Comments
 (0)