Added permit_ERC20_functionality

This commit is contained in:
Harshit Yadav 2022-03-09 03:35:40 +05:30
parent d515febb94
commit f2c2e45981

View File

@ -12,11 +12,22 @@ import {Events} from "./events.sol";
* @dev Adding permit functionality to ERC_20. * @dev Adding permit functionality to ERC_20.
*/ */
/* put the dev, vghra details and the parms and cases ofr dai and aave*/
contract permit_erc20 { 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( function depositWithPermit(
address _asset, address _asset,
address _owner, address _owner,