شبکه تست
بازگشت به بازارچه
پل سپولیا
پل سپولیا
تیم زنجیر
4.0 (3 نظر)

انتقال اتریوم از شبکه سپولیا به زنجیر

کد قرارداد هوشمند (تایید شده)

1
2// SPDX-License-Identifier: MIT
3pragma solidity ^0.8.0;
4
5import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
6import "@openzeppelin/contracts/access/Ownable.sol";
7
8contract ZanjirApp is ERC20, Ownable {
9    uint256 private constant INITIAL_SUPPLY = 1000000 * 10**18; // 1 million tokens
10
11    constructor() ERC20("ZanjirApp Token", "ZAT") {
12        _mint(msg.sender, INITIAL_SUPPLY);
13    }
14
15    function mint(address to, uint256 amount) public onlyOwner {
16        _mint(to, amount);
17    }
18
19    function burn(uint256 amount) public {
20        _burn(msg.sender, amount);
21    }
22
23    // Add app-specific functions here
24    function exampleFunction() public pure returns (string memory) {
25        return "This is an example function for the ZanjirApp contract";
26    }
27}
28