Skip to content

Commit 6586a74

Browse files
nhussein110xLuccaeshaben
committed
Add "Deploy an ERC20" with remix tutorial (#344)
* fix: adding tutorial to deploy erc20 and images * fix: moving smart contract code to snippet * Apply suggestions from code review Co-authored-by: 0xLucca <[email protected]> * fix: adding standard erc20 functions * fix: feedback * Update tutorials/smart-contracts/deploy-erc20.md Co-authored-by: Erin Shaben <[email protected]> * Update tutorials/smart-contracts/deploy-erc20.md Co-authored-by: Erin Shaben <[email protected]> * fix: erc-20 * fix: erc-20 instance * Update tutorials/smart-contracts/deploy-erc20.md Co-authored-by: Erin Shaben <[email protected]> * fix: sentence case applied * Update tutorials/smart-contracts/deploy-erc20.md Co-authored-by: Erin Shaben <[email protected]> * fix: bold list items * Update tutorials/smart-contracts/deploy-erc20.md Co-authored-by: Erin Shaben <[email protected]> * Update tutorials/smart-contracts/deploy-erc20.md Co-authored-by: Erin Shaben <[email protected]> * fix: action titles * fix: adding variables --------- Co-authored-by: 0xLucca <[email protected]> Co-authored-by: Erin Shaben <[email protected]>
1 parent aae0e57 commit 6586a74

File tree

16 files changed

+158
-1
lines changed

16 files changed

+158
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// SPDX-License-Identifier: MIT
2+
// Compatible with OpenZeppelin Contracts ^5.0.0
3+
pragma solidity ^0.8.22;
4+
5+
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
6+
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
7+
8+
contract MyToken is ERC20, Ownable {
9+
constructor(address initialOwner)
10+
ERC20("MyToken", "MTK")
11+
Ownable(initialOwner)
12+
{}
13+
14+
function mint(address to, uint256 amount) public onlyOwner {
15+
_mint(to, amount);
16+
}
17+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)