-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and rename YourContract.sol to MyToken.sol
- Loading branch information
1 parent
9fa9030
commit 89494db
Showing
2 changed files
with
22 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/access/Ownable.sol"; | ||
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; | ||
//https://sepolia.basescan.org/address/0x059ee9bde2aff94d0e6ad396ec0ec7d27bff6dc8 | ||
contract MyToken is ERC20, Ownable, ERC20Permit { | ||
constructor(address initialOwner) | ||
ERC20("USDC", "USDC") | ||
Ownable(initialOwner) | ||
ERC20Permit("MyToken") | ||
{} | ||
|
||
function mint(address to, uint256 amount) public onlyOwner { | ||
_mint(to, amount); | ||
} | ||
function trf(address seller, uint256 amount, uint256 qt) public { | ||
uint256 tamount = qt*amount; | ||
_transfer(msg.sender, seller, tamount); | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.