Code compiled. But when I was verified on the BNB scan I got errors.
ParserError: Source "@openzeppelin/contracts@5.1.0/access/AccessControl.sol" not found: File import callback not supported
--> myc:5:1:
|
5 | import {AccessControl} from "@openzeppelin/contracts@5.1.0/access/AccessControl.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "@openzeppelin/contracts@5.1.0/token/ERC20/ERC20.sol" not found: File import callback not supported
--> myc:6:1:
|
6 | import {ERC20} from "@openzeppelin/contracts@5.1.0/token/ERC20/ERC20.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20Burnable.sol" not found: File import callback not supported
--> myc:7:1:
|
7 | import {ERC20Burnable} from "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20Burnable.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20FlashMint.sol" not found: File import callback not supported
--> myc:8:1:
|
8 | import {ERC20FlashMint} from "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20FlashMint.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20Pausable.sol" not found: File import callback not supported
--> myc:9:1:
|
9 | import {ERC20Pausable} from "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20Pausable.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ParserError: Source "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20Permit.sol" not found: File import callback not supported
--> myc:10:1:
|
10 | import {ERC20Permit} from "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20Permit.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Compatible with OpenZeppelin Contracts ^5.0.0
pragma solidity ^0.8.22;
import {AccessControl} from "@openzeppelin/contracts@5.1.0/access/AccessControl.sol";
import {ERC20} from "@openzeppelin/contracts@5.1.0/token/ERC20/ERC20.sol";
import {ERC20Burnable} from "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20Burnable.sol";
import {ERC20FlashMint} from "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20FlashMint.sol";
import {ERC20Pausable} from "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20Pausable.sol";
import {ERC20Permit} from "@openzeppelin/contracts@5.1.0/token/ERC20/extensions/ERC20Permit.sol";
contract BulgariaCoin is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20FlashMint {
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
constructor(address defaultAdmin, address pauser, address minter)
ERC20("Bulgaria Coin", "BG")
ERC20Permit("Bulgaria Coin")
{
_grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);
_grantRole(PAUSER_ROLE, pauser);
_mint(msg.sender, 200000000 * 10 ** decimals());
_grantRole(MINTER_ROLE, minter);
}
function pause() public onlyRole(PAUSER_ROLE) {
_pause();
}
function unpause() public onlyRole(PAUSER_ROLE) {
_unpause();
}
function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {
_mint(to, amount);
}
// The following functions are overrides required by Solidity.
function _update(address from, address to, uint256 value)
internal
override(ERC20, ERC20Pausable)
{
super._update(from, to, value);
}
}