Skip to content

Commit

Permalink
Merge a586868 into 9540b68
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickGT committed Mar 11, 2022
2 parents 9540b68 + a586868 commit 9284840
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 17 deletions.
5 changes: 0 additions & 5 deletions abis/TWABDelegator.json
Expand Up @@ -728,11 +728,6 @@
},
{
"inputs": [
{
"internalType": "address",
"name": "_from",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
Expand Down
5 changes: 0 additions & 5 deletions abis/TWABDelegatorHarness.json
Expand Up @@ -752,11 +752,6 @@
},
{
"inputs": [
{
"internalType": "address",
"name": "_from",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
Expand Down
4 changes: 1 addition & 3 deletions contracts/PermitAndMulticall.sol
Expand Up @@ -42,20 +42,18 @@ contract PermitAndMulticall {
/**
* @notice Allow a user to approve an ERC20 token and run various calls in one transaction.
* @param _permitToken Address of the ERC20 token
* @param _from Address of the sender
* @param _amount Amount of tickets to approve
* @param _permitSignature Permit signature
* @param _data Datas to call with `functionDelegateCall`
*/
function _permitAndMulticall(
IERC20Permit _permitToken,
address _from,
uint256 _amount,
Signature calldata _permitSignature,
bytes[] calldata _data
) internal {
_permitToken.permit(
_from,
msg.sender,
address(this),
_amount,
_permitSignature.deadline,
Expand Down
4 changes: 1 addition & 3 deletions contracts/TWABDelegator.sol
Expand Up @@ -432,18 +432,16 @@ contract TWABDelegator is ERC20, LowLevelDelegator, PermitAndMulticall {

/**
* @notice Alow a user to approve ticket and run various calls in one transaction.
* @param _from Address of the sender
* @param _amount Amount of tickets to approve
* @param _permitSignature Permit signature
* @param _data Datas to call with `functionDelegateCall`
*/
function permitAndMulticall(
address _from,
uint256 _amount,
Signature calldata _permitSignature,
bytes[] calldata _data
) external {
_permitAndMulticall(IERC20Permit(address(ticket)), _from, _amount, _permitSignature, _data);
_permitAndMulticall(IERC20Permit(address(ticket)), _amount, _permitSignature, _data);
}

/**
Expand Down
1 change: 0 additions & 1 deletion test/TWABDelegator.test.ts
Expand Up @@ -815,7 +815,6 @@ describe('Test Set Name', () => {
);

await twabDelegator.permitAndMulticall(
owner.address,
amount,
{ v: signature.v, r: signature.r, s: signature.s, deadline: signature.deadline },
[stakeTx.data, createDelegationTx.data],
Expand Down

0 comments on commit 9284840

Please sign in to comment.