Skip to content

Commit

Permalink
move mock files
Browse files Browse the repository at this point in the history
  • Loading branch information
Da-Colon committed Jan 2, 2025
1 parent 6a7c73e commit 6b08a4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 41 deletions.
22 changes: 0 additions & 22 deletions contracts/src/mocks/MockERC20.sol

This file was deleted.

30 changes: 11 additions & 19 deletions contracts/test/mocks/MockERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,20 @@ pragma solidity ^0.8.28;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

/**
* @title MockERC20
* @dev A simple ERC20 token implementation for testing purposes.
*/
contract MockERC20 is ERC20 {
constructor(string memory name, string memory symbol) ERC20(name, symbol) {}
constructor(
string memory name,
string memory symbol,
uint8 decimals
) ERC20(name, symbol) {
_mint(msg.sender, 10 ** 9 * 10 ** uint256(decimals)); // Mint 1 billion tokens to deployer
}

/**
* @dev Mints `amount` tokens to `account`.
* @param account The account to mint tokens to.
* @param amount The amount of tokens to mint.
*/
function mint(address account, uint256 amount) external {
_mint(account, amount);
function mint(address to, uint256 amount) external {
_mint(to, amount);
}

/**
* @dev Burns `amount` tokens from `account`.
* @param account The account to burn tokens from.
* @param amount The amount of tokens to burn.
*/
function burn(address account, uint256 amount) external {
_burn(account, amount);
function burn(address from, uint256 amount) external {
_burn(from, amount);
}
}

0 comments on commit 6b08a4d

Please sign in to comment.