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
| using System; | |
| using System.IO; | |
| using System.Net.Http; | |
| using System.Threading.Tasks; | |
| using System.Net; | |
| using System.Net.Mail; | |
| using Microsoft.AspNetCore.Mvc; | |
| using Microsoft.Azure.WebJobs; | |
| using Microsoft.Azure.WebJobs.Extensions.Http; | |
| using Microsoft.AspNetCore.Http; |
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 https = require('https'); | |
| const Web3 = require('web3'); | |
| const axios = require('axios'); | |
| require('dotenv').config(); | |
| const fs = require('fs'); | |
| const express = require('express'); | |
| // Load environment variables | |
| const COINGECKO_API_KEY = process.env.COINGECKO_API_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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.0; | |
| contract MyToken { | |
| string public name = "MyToken"; | |
| string public symbol = "MTK"; | |
| uint8 public decimals = 18; | |
| uint256 public totalSupply = 1000000 * 10 ** uint256(decimals); | |
| mapping(address => uint256) public balanceOf; |
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 HDWalletProvider = require("@truffle/hdwallet-provider"); | |
| const infuraKey = "YOUR_INFURA_KEY"; | |
| const mnemonic = "your 12-word mnemonic"; | |
| module.exports = { | |
| networks: { | |
| rinkeby: { | |
| provider: () => new HDWalletProvider(mnemonic, `https://rinkeby.infura.io/v3/${infuraKey}`), | |
| network_id: 4, // Rinkeby ID | |
| gas: 5500000, |
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 { FrameRequest, getFrameMessage, getFrameHtmlResponse } from '@coinbase/onchainkit'; | |
| import { NextRequest, NextResponse } from 'next/server'; | |
| import { NEXT_PUBLIC_URL } from '../../config'; | |
| import { getChartOptions } from '../lib/getChartOptions'; | |
| import { throwErr } from '../lib/throwErr'; | |
| async function getResponse(req: NextRequest): Promise<NextResponse> { | |
| let text: string | undefined = ''; | |
| let pool: any | undefined = {}; | |
| let chain: string = ''; |
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 { getFrameMetadata } from '@coinbase/onchainkit'; | |
| import type { Metadata } from 'next'; | |
| import { NEXT_PUBLIC_URL } from './config'; | |
| const frameMetadata = getFrameMetadata({ | |
| buttons: [ | |
| { | |
| label: 'Trending Crypto Pools', | |
| }, | |
| { |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Crypto Predictor</title> | |
| </head> | |
| <body> | |
| <h1>Crypto Predictor</h1> | |
| <form method="POST"> | |
| <label for="coin_id">Coin ID:</label><br> | |
| <select id="coin_id" name="coin_id"> |
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
| from flask import Flask, jsonify, render_template, request | |
| import requests | |
| import json | |
| import numpy as np | |
| from sklearn.linear_model import LinearRegression | |
| import time | |
| from sklearn.preprocessing import MinMaxScaler | |
| from datetime import datetime, timedelta | |
| app = Flask(__name__) |
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
| from telegram import Update | |
| from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes | |
| import requests | |
| import json | |
| # Define your CoinGecko API key | |
| api_key = 'YOUR_COINGECKO_API_KEY' | |
| # Function to fetch cryptocurrency data from CoinGecko | |
| def get_crypto_data(crypto): |
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 axios = require('axios'); | |
| const app = express(); | |
| app.get('/api/v3/coins/:id/history', (req, res) => { | |
| const url = `https://api.coingecko.com/api/v3/coins/${req.params.id}/history`; | |
| axios.get(url, { | |
| params: req.query, | |
| headers: { |