From 4d927d0014f72b7a8708e42809485ae9830699a4 Mon Sep 17 00:00:00 2001 From: gnkz Date: Sat, 19 Oct 2024 14:48:24 -0300 Subject: [PATCH] feat: Update pragma solidity version and add ERC20Permit extension to WrappedNativeToken --- src/WrappedNativeToken.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/WrappedNativeToken.sol b/src/WrappedNativeToken.sol index 0756af8..2119ab8 100644 --- a/src/WrappedNativeToken.sol +++ b/src/WrappedNativeToken.sol @@ -1,15 +1,16 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.27; +pragma solidity ^0.8.4; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; -contract WrappedNativeToken is ERC20 { +contract WrappedNativeToken is ERC20Permit { event Deposit(address indexed _sender, uint256 _amount); event Withdrawal(address indexed _sender, uint256 _amount); error NotEnoughBalance(); - constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {} + constructor(string memory _name, string memory _symbol) ERC20Permit(_name) ERC20(_name, _symbol) {} function deposit() public payable { _mint(msg.sender, msg.value);