|
1 | 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
2 | 2 | pragma solidity 0.7.3; |
3 | 3 |
|
4 | | -import { |
5 | | - SafeMathUpgradeable |
6 | | -} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; |
7 | | -import { |
8 | | - IERC20Upgradeable |
9 | | -} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; |
10 | | -import { |
11 | | - OwnableUpgradeable |
12 | | -} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; |
| 4 | +import {SafeMathUpgradeable} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; |
| 5 | +import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; |
| 6 | +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; |
13 | 7 |
|
14 | 8 | /** |
15 | 9 | * @title XC(cross-chain)Ample ERC20 token |
@@ -79,12 +73,14 @@ contract XCAmple is IERC20Upgradeable, OwnableUpgradeable { |
79 | 73 | // EIP-2612: permit – 712-signed approvals |
80 | 74 | // https://eips.ethereum.org/EIPS/eip-2612 |
81 | 75 | string public constant EIP712_REVISION = "1"; |
82 | | - bytes32 public constant EIP712_DOMAIN = keccak256( |
83 | | - "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" |
84 | | - ); |
85 | | - bytes32 public constant PERMIT_TYPEHASH = keccak256( |
86 | | - "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" |
87 | | - ); |
| 76 | + bytes32 public constant EIP712_DOMAIN = |
| 77 | + keccak256( |
| 78 | + "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" |
| 79 | + ); |
| 80 | + bytes32 public constant PERMIT_TYPEHASH = |
| 81 | + keccak256( |
| 82 | + "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" |
| 83 | + ); |
88 | 84 |
|
89 | 85 | // EIP-2612: keeps track of number of permits per address |
90 | 86 | mapping(address => uint256) private _nonces; |
|
0 commit comments