- Updated DBIS_ConversionRouter and DBIS_SettlementRouter to utilize IDBIS_EIP712Helper for EIP-712 hashing and signature recovery, improving stack depth management. - Refactored minting logic in DBIS_GRU_MintController to streamline recipient processing. - Enhanced BUILD_NOTES.md with updated build instructions and test coverage details. - Added new functions in DBIS_SignerRegistry for duplicate signer checks and active signer validation. - Introduced a new submodule, DBIS_EIP712Helper, to encapsulate EIP-712 related functionalities. Made-with: Cursor
25 lines
724 B
Solidity
25 lines
724 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.20;
|
|
|
|
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
|
import "@openzeppelin/contracts/access/AccessControl.sol";
|
|
|
|
contract MockMintableToken is ERC20, AccessControl {
|
|
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
|
|
|
|
constructor(string memory name, string memory symbol, uint8 decimals_, address admin)
|
|
ERC20(name, symbol)
|
|
{
|
|
_grantRole(DEFAULT_ADMIN_ROLE, admin);
|
|
_grantRole(MINTER_ROLE, admin);
|
|
}
|
|
|
|
function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) {
|
|
_mint(to, amount);
|
|
}
|
|
|
|
function decimals() public view virtual override returns (uint8) {
|
|
return 6;
|
|
}
|
|
}
|