diff --git a/solution_2 b/solution_2 new file mode 100644 index 00000000..2c082674 --- /dev/null +++ b/solution_2 @@ -0,0 +1,21 @@ +Contract Address: https://explorer.public.zkevm-test.net/address/0xb13e12b1530B424d733d149f4Fd86B95d2a011D3 + +Transaction Address: https://explorer.public.zkevm-test.net/tx/0xe2e3043de28fcd19c433b110c5cbb22769b661c1cc2fcd96693f2aa7e451a46e + +-------------------------------------------------------- + +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; + +contract ZkShreyaBadonia is ERC20, Ownable { + constructor() ERC20("zkShreyaBadonia", "zkSB") { + _mint(msg.sender, 107200 * 10 ** decimals()); + } + + function mint(address to, uint256 amount) public onlyOwner { + _mint(to, amount); + } +} diff --git a/solution_3 b/solution_3 new file mode 100644 index 00000000..cd9e4e5d --- /dev/null +++ b/solution_3 @@ -0,0 +1,17 @@ +``` +const { ethers, parseUnits } = require('ethers'); +require('dotenv').config(); +const abi = require('./abi.json').abi; +const contractAddress = '0xb13e12b1530b424d733d149f4fd86b95d2a011d3'; +const provider = new ethers.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.approve("0xb13e12b1530b424d733d149f4fd86b95d2a011d3", parseUnits("107000000000000000000")); + await contract.createTokens("0xb13e12b1530b424d733d149f4fd86b95d2a011d3"); + console.log("ok") +} +call(); +``` + +Transaction Link - https://explorer.public.zkevm-test.net/tx/0xf6ba192967b1f6ed9b0d156d0fc0d43c3110402c28d2a3f6cd3ef2609730d120