From f2c2e4598199709b20b343e7ad01e9157f4bcbb2 Mon Sep 17 00:00:00 2001 From: Harshit Yadav Date: Wed, 9 Mar 2022 03:35:40 +0530 Subject: [PATCH] Added permit_ERC20_functionality --- .../mainnet/connectors/permit_erc20/main.sol | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/contracts/mainnet/connectors/permit_erc20/main.sol b/contracts/mainnet/connectors/permit_erc20/main.sol index 9045b291..6a434a8a 100644 --- a/contracts/mainnet/connectors/permit_erc20/main.sol +++ b/contracts/mainnet/connectors/permit_erc20/main.sol @@ -12,11 +12,22 @@ import {Events} from "./events.sol"; * @dev Adding permit functionality to ERC_20. */ - /* put the dev, vghra details and the parms and cases ofr dai and aave*/ contract permit_erc20 { - address dai_address = 0x6B175474E89094C44Da98b954EedeAC495271d0F; + address dai_address = 0x6B175474E89094C44Da98b954EedeAC495271d0F; // dai has a different implementation for permit + /** + * @notice ERC20_Permit functionality + * @dev Adding permit functionality to ERC_20. + * @param _asset The address of the token to call.(For AAVE Token : 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9) + * @param _owner The public of the user which wants to permit the user to take funds.(Ex: - 0x3Fc046bdE274Fe8Ed2a7Fd008cD9DEB2540dfE36 ) + * @param nonce The nonce of the user(Neede only if asset is DAI) //can add helper here + * @param _amount The amount of the token permitted by the owner (No need to specify in DAI, you get access to all the funds in DAI). + * @param _deadline The deadline decided by the owner. + * @param v The signature variable provided by the owner. + * @param r The signature variable provided by the owner. + * @param s The signature variable provided by the owner. + */ function depositWithPermit( address _asset, address _owner,