Skip to content

Instantly share code, notes, and snippets.

View dharniel45's full-sized avatar
🎯
Focusing

Daniel Idowu dharniel45

🎯
Focusing
View GitHub Profile
!DOCTYPE html
<html>
<body>
<h1>HOW TO CHANGE HTML CONTENT WITH
JAVASCRIPT<h2>
<p id="real">A Language That Gives You
var alphabet = 'abcdefghijklmnopqrstuvwxyz';
var firstpart = alphabet.substring(0,13).split('');
var secondpart = alphabet.substring(13).split('').reverse();
var button = document.getElementById("button");
var solution = '';
button.onclick = function() {
var b = document.getElementById("text").value.split('');
for (var i = 0 ; i < b.length; i++) {
@dharniel45
dharniel45 / Rare1.sol
Last active February 16, 2022 21:49
Show code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract Rare is ERC721, ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract AgateNFT is ERC721, ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
const HDWalletProvider = require('@truffle/hdwallet-provider');
const fs = require('fs');
const mnemonic = fs.readFileSync('.secret').toString().trim();
module.exports = {
 networks: {
 development: {
 host: "127.0.0.1",
 port: 7545,
 network_id: "*"
 },
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract ClassicBurnNFT is ERC721, ERC721Enumerable, ERC721Burnable, Ownable {
 using Counters for Counters.Counter;
 Counters.Counter private _tokenIdCounter;
async function main() {
 // We get the contract to deploy
 const Contract = await ethers.getContractFactory("ClassicBurnNFT");
 const contract = await Contract.deploy();
 
 await contract.deployed();
 
 console.log("Contract deployed to:", contract.address);
 }
 
require("@nomiclabs/hardhat-waffle");
require('dotenv').config();
const { API_URL, PRIVATE_KEY } = process.env;
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
 const accounts = await hre.ethers.getSigners();
 for (const account of accounts) {
 console.log(account.address);
 }
});
/**
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");
require('dotenv').config();
const { API_URL, PRIVATE_KEY, ETHERSCAN_API } = process.env;
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
 const accounts = await hre.ethers.getSigners();
 for (const account of accounts) {
 console.log(account.address);
 }
});
require("@nomiclabs/hardhat-waffle");
require('dotenv').config();
module.exports = {
 defaultNetwork: "mumbai",
 networks: {
mumbai: {
url: "https://rpc-mumbai.maticvigil.com",
accounts: [process.env.PRIVATE_KEY]
 }
 },