Skip to content

Instantly share code, notes, and snippets.

View dharniel45's full-sized avatar
🎯
Focusing

Daniel Idowu dharniel45

🎯
Focusing
View GitHub Profile
import requests
import hashlib
url = "https://labs.nobitex.ir/"
response = requests.get(url)
if response.status_code == 200:
web_page_content = response.text
keccak256_hash = hashlib.sha3_256(web_page_content.encode()).hexdigest()
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import { IERC20 } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IERC20.sol';
import { IAxelarGasService } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGasService.sol';
import { IAxelarGateway } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway.sol';
import { AxelarExecutable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/executable/AxelarExecutable.sol';
import { Upgradable } from '@axelar-network/axelar-gmp-sdk-solidity/contracts/upgradable/Upgradable.sol';
@dharniel45
dharniel45 / feedback.sol
Last active April 15, 2023 11:13
feedback.sol
Future<DeployedContract> getContract() async {
String abiFile = await rootBundle.loadString("assets/contract.json");
String contractAddress = "0xc3b3E80d184cA5aec3A49A40350D42623AFf3fab";
final contract = DeployedContract(ContractAbi.fromJson(abiFile, "Feedback"),
EthereumAddress.fromHex(contractAddress));
return contract;
}
new Date() . toLocaleDateString('en-us', { weekday: "long", year: "numeric",
month: "short", day: "numeric"})
/ "Wednesday, Feb 1, 2023"
use borsh::{BorshDeserialize, BorshSerialize};
use solana_program::{
account_info::{next_account_info, AccountInfo},
entrypoint,
program_error::ProgramError,
pubkey::Pubkey,
};
#[derive(BorshSerialize, BorshDeserialize, Debug)]
pub struct GreetingAccount {
const { initializeAlchemy, getOwnersForNft } = require('@alch/alchemy-sdk');
const settings = {
 apiKey: 'API Key',
};
const alchemy = initializeAlchemy(settings);
const main = async () => {
 
 const address =
 '0x67BcbC1C0E120D0A700Eb38A2d769C20A1DfB8f6'
 const tokenId = 3
import "./App.css";
import "./EthersBtn";
import EthersBtn from "./EthersBtn";
import { CrossmintPayButton } from "@crossmint/client-sdk-react-ui;
function App() {
 const styles = {
 display: 'inline-flex', 
 marginTop: '10px',
 color: 'black'
 }
const CONTRACT = require("./../artifacts/contracts/AfterApe.sol/AfterApeNFT.json");
require("dotenv").config();
const { ALCHEMY_URL, PUBLIC_KEY, PRIVATE_KEY, CONTRACT_ADDRESS, CID } = process.env;
const web3 = createAlchemyWeb3(`${ALCHEMY_URL}`);
const nftContract = new web3.eth.Contract(CONTRACT.abi, CONTRACT_ADDRESS);
async function mintNFT(tokenURI) {
const nonce = await web3.eth.getTransactionCount(PUBLIC_KEY, "latest");
//the transaction
const tx = {
"from": PUBLIC_KEY,
require('@nomiclabs/hardhat-waffle');
require("dotenv").config({ path: ".env" });
module.exports = {
 solidity: {
 version: "0.8.1"
 },
 networks: {
 rinkeby: {
 url: process.env.ALCHEMY_API_KEY_URL,
 accounts: [process.env.RINKEBY_PRIVATE_KEY],
const main = async () => {
 const nftContractFactory = await hre.ethers.getContractFactory('AfterApeNFT');
 const nftContract = await nftContractFactory.deploy();
 await nftContract.deployed();
 console.log("Contract deployed to: ", nftContract.address);
}
const runMain = async () => {
 try {
 await main();
 process.exit(0);