diff --git a/solution_2 b/solution_2 new file mode 100644 index 00000000..b33abdd9 --- /dev/null +++ b/solution_2 @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +import "@openzeppelin/contracts@4.8.2/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts@4.8.2/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 diff --git a/solution_3 b/solution_3 new file mode 100644 index 00000000..30740a64 --- /dev/null +++ b/solution_3 @@ -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(); +```