Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vedantpar_zkThon #372

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
41 changes: 41 additions & 0 deletions solution 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
```bash
# Contract Address
https://explorer.public.zkevm-test.net/address/0xC595d98Cc068eC7a9E313D11889065D1ac7462cF
# Transaction Address
https://explorer.public.zkevm-test.net/tx/0x9df51553546ef22032da9b139eb49117a8fc8a2b6fde2846accca72d0aa2d713
```


// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol";
import "@openzeppelin/[email protected]/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/[email protected]/security/Pausable.sol";
import "@openzeppelin/[email protected]/access/Ownable.sol";

contract Vedantpar is ERC20, ERC20Burnable, Pausable, Ownable {
constructor() ERC20("vedantpar", "zkVP") {
_mint(msg.sender, 520099 * 10 ** decimals());
}

function pause() public onlyOwner {
_pause();
}

function unpause() public onlyOwner {
_unpause();
}

function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}

function _beforeTokenTransfer(address from, address to, uint256 amount)
internal
whenNotPaused
override
{
super._beforeTokenTransfer(from, to, amount);
}
}
16 changes: 16 additions & 0 deletions solution 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Transaction Hash
https://explorer.public.zkevm-test.net/tx/0x356014af7db71d7194c9e697047a9e115ac83daba2bb5e07bf8a97024dff27e5

```
const { ethers } = require('ethers');
require('dotenv').config();
const abi = require('../artifacts/contracts/zkThon.sol/zkThon.json').abi;
const contractAddress = '0x3ac587078b344a3d27e56632dff236f1aff04d56';
const provider = new ethers.providers.JsonRpcProvider('https://rpc.public.zkevm-test.net');
const signer = new ethers.Wallet(process.env.PRIVATE_KEY, provider);
const contract = new ethers.Contract(contractAddress, abi, signer);
async function call() {
await contract.submitUsername('vedantpar');
}
call();
```