-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Update] Added erc20penaltyfee and erc721nolockup scenarios
- Loading branch information
1 parent
9c283a6
commit 65aa9ed
Showing
11 changed files
with
529 additions
and
15 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,24 +1,29 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
pragma solidity 0.8.25; | ||
|
||
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import "@openzeppelin/contracts/access/Ownable.sol"; | ||
|
||
contract ERC20MockToken is ERC20 { | ||
|
||
contract ERC20MockToken is ERC20, Ownable { | ||
uint8 private immutable _decimals; | ||
constructor(string memory name, string memory symbol, uint8 decimals_) ERC20(name, symbol) { | ||
|
||
constructor( | ||
string memory name, | ||
string memory symbol, | ||
uint8 decimals_ | ||
) ERC20(name, symbol) Ownable(msg.sender) { | ||
_decimals = decimals_; | ||
} | ||
|
||
function mint(address account, uint256 amount) external { | ||
function mint(address account, uint256 amount) external onlyOwner { | ||
_mint(account, amount); | ||
} | ||
|
||
function burn(address account, uint256 amount) external { | ||
function burn(address account, uint256 amount) external onlyOwner { | ||
_burn(account, amount); | ||
} | ||
|
||
function decimals() public view override returns (uint8) { | ||
return _decimals; | ||
} | ||
} | ||
} |
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,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.25; | ||
|
||
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | ||
import "@openzeppelin/contracts/access/Ownable.sol"; | ||
|
||
contract ERC721MockToken is ERC721, Ownable { | ||
uint256 private _nextTokenId; | ||
|
||
constructor( | ||
string memory name, | ||
string memory symbol | ||
) ERC721(name, symbol) Ownable(msg.sender) {} | ||
|
||
function safeMint(address to) public onlyOwner { | ||
uint256 tokenId = _nextTokenId++; | ||
_safeMint(to, tokenId); | ||
} | ||
} |
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
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
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
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
File renamed without changes.
Oops, something went wrong.