Skip to content

Commit

Permalink
🧹 Fix license in oft-evm for MintBurnOFTAdapter and periphery (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
St0rmBr3w authored Dec 10, 2024
1 parent 5c47a41 commit 60cc71c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-buckets-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@layerzerolabs/oft-evm": minor
---

changed license for MintBurnOFTAdapter and periphery contracts to MIT from UNLICENSED
2 changes: 1 addition & 1 deletion packages/oft-evm/contracts/MintBurnOFTAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

// External imports
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

/// @title Interface for mintable and burnable tokens
Expand Down
1 change: 1 addition & 0 deletions packages/oft-evm/test/mocks/ElevatedMinterBurnerMock.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
Expand Down
33 changes: 30 additions & 3 deletions packages/oft-evm/test/mocks/MintBurnERC20Mock.sol
Original file line number Diff line number Diff line change
@@ -1,19 +1,46 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

import { IMintableBurnable } from "../../contracts/interfaces/IMintableBurnable.sol";

// @dev WARNING: This is for testing purposes only
/**
* @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;
Expand Down

0 comments on commit 60cc71c

Please sign in to comment.