-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update MintBurnERC20Mock warnings
- Loading branch information
Showing
3 changed files
with
76 additions
and
22 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
examples/mint-burn-oft-adapter/contracts/mocks/MintBurnERC20Mock.sol
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,48 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
|
||
import { IMintableBurnable } from "@layerzerolabs/oft-evm/contracts/interfaces/IMintableBurnable.sol"; | ||
|
||
/** | ||
* @title MintBurnERC20Mock | ||
* | ||
* @dev WARNING: This contract is for testing purposes only. | ||
* In a production scenario, the `mint` and `burn` methods | ||
* should be guarded by appropriate access control mechanisms. | ||
*/ | ||
contract MintBurnERC20Mock is ERC20, IMintableBurnable { | ||
/// @notice Constructor to initialize the ERC20 token with a name and symbol. | ||
constructor(string memory name, string memory symbol) ERC20(name, symbol) {} | ||
|
||
/** | ||
* @notice Burns a specific amount of tokens from a given address. | ||
* | ||
* @dev WARNING: In production, this function should have access control. | ||
* | ||
* @param _from The address from which tokens will be burned. | ||
* @param _amount The amount of tokens to burn. | ||
* | ||
* @return A boolean indicating the success of the burn operation. | ||
*/ | ||
function burn(address _from, uint256 _amount) external returns (bool) { | ||
_burn(_from, _amount); | ||
return true; | ||
} | ||
|
||
/** | ||
* @notice Mints a specific amount of tokens to a given address. | ||
* | ||
* @dev WARNING: In production, this function should have access control. | ||
* | ||
* @param _to The address to which tokens will be minted. | ||
* @param _amount The amount of tokens to mint. | ||
* | ||
* @return A boolean indicating the success of the mint operation. | ||
*/ | ||
function mint(address _to, uint256 _amount) external returns (bool) { | ||
_mint(_to, _amount); | ||
return true; | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
examples/mint-burn-oft-adapter/contracts/mocks/MyMintBurnERC20Mock.sol
This file was deleted.
Oops, something went wrong.
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