Triển khai smart contract trên Lisk sử dụng Remix IDE
Remix IDE là gì?
- Là một môi trường phát triển Editor chạy trên trình duyệt
- Được thiết kế chuyên biệt để lập trình, kiểm thử và triển khai smart contract trên nền tảng Ethereum
Deploy ERC20 Token on Lisk
1. Tạo file ERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyToken is ERC20 {
constructor() ERC20("MyToken", "MT") {
_mint(msg.sender, 1000000 * (10 ** uint256(decimals())));
}
}
2. Compile smart contract ERC20
3. Deploy smart contract ERC20
- Quy trình deploy
- Deploy
4. Kết quả sau khi thực hiện deploy
5. Write Contract - Transfer token
Gía trị | |
---|---|
to | 0x6152604216364a3703f5f42a294e06b5656400e6 |
value | 10000000000000000000 (10 token) |