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
| #include <WiFi.h> | |
| #include <WebServer.h> | |
| #include <PubSubClient.h> | |
| #include <Wire.h> | |
| #include <Adafruit_GFX.h> | |
| #include <Adafruit_SH110X.h> | |
| // ================= WLAN ================= | |
| const char* ssid = "SCHUL-SUS"; | |
| const char* password = "Schule.2021"; |
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 express = require('express'); | |
| const ngrok = require('ngrok'); | |
| const app = express(); | |
| const PORT = 3000; | |
| app.use(express.static('public')); | |
| async function startNgrok(port) { | |
| try { |
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 axios = require('axios'); | |
| const apiKey = 'YOUR_BSCSCAN_API_KEY'; | |
| const contractAddress = 'YOUR_CONTRACT_ADDRESS'; | |
| const apiUrl = `https://api.bscscan.com/api?module=token&action=tokenholderlist&contractaddress=${contractAddress}&apikey=${apiKey}`; | |
| async function getAllHolders() { | |
| try { | |
| const response = await axios.get(apiUrl); | |
| const holders = response.data.result; |
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 form = document.querySelector("#payment-form"); | |
| form.addEventListener("submit", async (event) => { | |
| event.preventDefault(); | |
| const { token, error } = await stripe.createToken("card", { | |
| card: { | |
| number: "4242424242424242", | |
| exp_month: 12, | |
| exp_year: 2024, | |
| cvc: "123", | |
| }, |
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.0; | |
| import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
| import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; | |
| contract MyERC20 is ERC20, ERC20Burnable { | |
| constructor(string memory tokenName, string memory tokenSymbol, uint256 initialSupply) ERC20(tokenName, tokenSymbol) { | |
| _mint(msg.sender, initialSupply * 1 ether); | |
| } |
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.0; | |
| import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; | |
| contract ERC1155BulkSender { | |
| /** | |
| * @dev Transfers a batch of ERC1155 tokens to multiple recipients. | |
| * @param contractAddress The address of the ERC1155 token contract. | |
| * @param recipients An array of recipient addresses to send tokens to. | |
| * @param tokenId The ID of the token to send. | |
| * @param amount The amount of tokens to send to each recipient. |