mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-04-23 03:00:50 -04:00
fix(contracts): OZ-L06 Possible Misleading revert Message When Swapping Non-ERC20Permit Tokens (#847)
Co-authored-by: zimpha <zimpha@users.noreply.github.com> Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var tag = "v4.1.107"
|
||||
var tag = "v4.1.108"
|
||||
|
||||
var commit = func() string {
|
||||
if info, ok := debug.ReadBuildInfo(); ok {
|
||||
|
||||
@@ -15,6 +15,7 @@ import {OwnableBase} from "../libraries/common/OwnableBase.sol";
|
||||
|
||||
contract GasSwap is ERC2771Context, ReentrancyGuard, OwnableBase {
|
||||
using SafeERC20 for IERC20;
|
||||
using SafeERC20 for IERC20Permit;
|
||||
|
||||
/**********
|
||||
* Events *
|
||||
@@ -94,7 +95,7 @@ contract GasSwap is ERC2771Context, ReentrancyGuard, OwnableBase {
|
||||
address _sender = _msgSender();
|
||||
|
||||
// do permit
|
||||
IERC20Permit(_permit.token).permit(
|
||||
IERC20Permit(_permit.token).safePermit(
|
||||
_sender,
|
||||
address(this),
|
||||
_permit.value,
|
||||
|
||||
Reference in New Issue
Block a user