Skip to content

Commit

Permalink
fix(EIP2612): use only one struct for signature
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickGT committed Nov 1, 2021
1 parent d6d13e7 commit 1bbaf51
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions contracts/permit/EIP2612PermitAndDeposit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,12 @@ import "../interfaces/IPrizePool.sol";
import "../interfaces/ITicket.sol";

/**
* @notice Permit signature to allow spending of ERC20 token by this contract.
* @notice Secp256k1 signature values.
* @param v `v` portion of the signature
* @param r `r` portion of the signature
* @param s `s` portion of the signature
*/
struct PermitSignature {
uint8 v;
bytes32 r;
bytes32 s;
}

/**
* @notice Delegate signature to allow delegation of tickets to delegate.
* @param v `v` portion of the signature
* @param r `r` portion of the signature
* @param s `s` portion of the signature
*/
struct DelegateSignature {
struct Signature {
uint8 v;
bytes32 r;
bytes32 s;
Expand Down Expand Up @@ -56,8 +44,8 @@ contract EIP2612PermitAndDeposit {
address _owner,
uint256 _amount,
uint256 _deadline,
PermitSignature calldata _permitSignature,
DelegateSignature calldata _delegateSignature,
Signature calldata _permitSignature,
Signature calldata _delegateSignature,
address _prizePool,
address _to,
ITicket _ticket,
Expand Down

0 comments on commit 1bbaf51

Please sign in to comment.