This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new Date() . toLocaleDateString('en-us', { weekday: "long", year: "numeric", | |
| month: "short", day: "numeric"}) | |
| / "Wednesday, Feb 1, 2023" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); |
NewerOlder