Skip to content

Commit

Permalink
#7 mint 100 tokens on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
john-s-morgan committed May 12, 2022
1 parent b33b4b7 commit 5624226
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contracts/Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ contract Token is ERC721 {

constructor(string memory uri) ERC721("Token", "MTK") {
baseUri = uri;

// TODO: move address to config
address mintAddress = 0x697fB223656dEa2b0EFCCfc6FBFc1CE4E7224843;
mintInternalTokens(100, mintAddress);
}

function mintInternalTokens(uint256 count, address to) internal {
for (uint256 i = 0; i < count; i++) {
_safeMint(to, 1 + count);
}
}

// Apparently we need to use View instead of pure here,
Expand Down

0 comments on commit 5624226

Please sign in to comment.