Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/contracts/contracts/L1/local/TestBitToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ contract BitTokenERC20 is ERC20 {
// public mint for any user
function mint(uint256 amount) external {
require(msg.sender != address(0), "ERC20: mint to the zero address");
require(amount <= 1000000000000000000000, "ERC20: mint amount too large, maximum is 1000000000000000000000");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1000000000000000000000 => 1e21 maybe better

if((mintRecord[msg.sender] == 0 || block.number - mintRecord[msg.sender] > mintGap) || ERC20(this).balanceOf(msg.sender) < 1000000000000000000000) {
mintRecord[msg.sender] = block.number;
_mint(msg.sender, amount);
Expand Down
Loading