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

sanaya888grover_zkThon #392

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
21 changes: 21 additions & 0 deletions solution_2
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

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

contract Sanayagrover is ERC20, Ownable {
constructor() ERC20("sanayagrover", "SG") {
_mint(msg.sender, 888000 * 10 ** decimals());
}

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

# Contract Address
https://explorer.public.zkevm-test.net/address/0x491BF230564EBd00a9a640514934115E13acdD56

# Transaction Address
https://explorer.public.zkevm-test.net/tx/0x7c50513bb196e43c607de4d58410bb7bf65958a9a8ada6c373dd91e8d9b82a5a
15 changes: 15 additions & 0 deletions solution_3
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
transaction URL:https://explorer.public.zkevm-test.net/tx/0xa179843da39b7acc3391f34bcb66c2f0aa30b364ca83a9a952ad2e6350ceb956

```
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('sanaya888grover');
}
call();
```