-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
45 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
24108 | ||
24177 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IAllowanceTransfer} from "permit2/src/interfaces/IAllowanceTransfer.sol"; | ||
|
||
/// @notice PermitForwarder allows permitting this contract as a spender on permit2 | ||
/// @dev This contract does not enforce the spender to be this contract, but that is the intended use case | ||
interface IPermit2Forwarder { | ||
/// @notice allows forwarding a single permit to permit2 | ||
/// @dev this function is payable to allow multicall with NATIVE based actions | ||
/// @param owner the owner of the tokens | ||
/// @param permitSingle the permit data | ||
/// @param signature the signature of the permit; abi.encodePacked(r, s, v) | ||
/// @return err the error returned by a reverting permit call, empty if successful | ||
function permit(address owner, IAllowanceTransfer.PermitSingle calldata permitSingle, bytes calldata signature) | ||
external | ||
payable | ||
returns (bytes memory err); | ||
|
||
/// @notice allows forwarding batch permits to permit2 | ||
/// @dev this function is payable to allow multicall with NATIVE based actions | ||
/// @param owner the owner of the tokens | ||
/// @param _permitBatch a batch of approvals | ||
/// @param signature the signature of the permit; abi.encodePacked(r, s, v) | ||
/// @return err the error returned by a reverting permit call, empty if successful | ||
function permitBatch(address owner, IAllowanceTransfer.PermitBatch calldata _permitBatch, bytes calldata signature) | ||
external | ||
payable | ||
returns (bytes memory err); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters