Skip to content

Commit c5d80c5

Browse files
committed
Fixed ERC20 interface
1 parent b7ec024 commit c5d80c5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/interfaces/IERC20.sol

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,23 @@ interface IERC20 {
8484
/// @dev Emits an {Approval} event.
8585
/// @param _spender The address approved to spend tokens.
8686
/// @param _value The number of tokens to approve.
87-
function approve(address _spender, uint256 _value) external;
87+
/// @return True if the operation succeeded.
88+
function approve(address _spender, uint256 _value) external returns (bool);
8889

8990
/// @notice Transfers tokens to another address.
9091
/// @dev Emits a {Transfer} event.
9192
/// @param _to The address to receive the tokens.
9293
/// @param _value The amount of tokens to transfer.
93-
function transfer(address _to, uint256 _value) external;
94+
/// @return True if the operation succeeded.
95+
function transfer(address _to, uint256 _value) external returns (bool);
9496

9597
/// @notice Transfers tokens on behalf of another account, provided sufficient allowance exists.
9698
/// @dev Emits a {Transfer} event and decreases the spender's allowance.
9799
/// @param _from The address to transfer tokens from.
98100
/// @param _to The address to transfer tokens to.
99101
/// @param _value The amount of tokens to transfer.
100-
function transferFrom(address _from, address _to, uint256 _value) external;
102+
/// @return True if the operation succeeded.
103+
function transferFrom(address _from, address _to, uint256 _value) external returns (bool);
101104

102105
/// @notice Burns (destroys) a specific amount of tokens from the caller's balance.
103106
/// @dev Emits a {Transfer} event to the zero address.

0 commit comments

Comments
 (0)