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
pragma solidity ^0.6.0; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.0.0/contracts/token/ERC20/ERC20.sol"; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.0.0/contracts/math/SafeMath.sol"; | |
import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; | |
contract RTOToken is ERC20 { | |
using SafeMath for uint256; | |
address public deployer; |
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
{% extends 'base.html' %} | |
{% block content %} | |
<div class="card my-3 col-4 mx-auto"> | |
<h5 class="card-header">Register for the last decentralized dating app you'll ever need.</h5> | |
<div class="card-body"> | |
<form action="/newuser/" enctype="multipart/form-data" method="post"> | |
<div class="my-3 mx-5"> | |
<label for="name" class="form-label">Name</label> | |
<input id="name" name="name" class="form-control" required> |
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
{% extends 'base.html' %} | |
{% block content %} | |
<h1 class="my-3">Greetings CryptoMinglers!</h1> | |
{% if users_list %} | |
{% for user in users_list %} | |
{% set contact_url = 'mailto:' + user['email'] %} | |
<div class="card mb-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
{% extends 'base.html' %} | |
{% block content %} | |
<h1 class="my-3">Greetings CryptoMinglers!</h1> | |
{% if users_list %} | |
{% for user in users_list %} | |
{% set contact_url = 'mailto:' + user['email'] %} | |
<div class="card mb-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 transactions | |
from database import * | |
import config | |
from pinata import * | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import Session | |
from fastapi import Depends, FastAPI, HTTPException, Form, File, UploadFile | |
from fastapi.templating import Jinja2Templates |
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 config | |
def pin_to_pinata(file_obj, filename): | |
url = "https://api.pinata.cloud/pinning/pinFileToIPFS" | |
payload = {} | |
files = [ | |
('file', (filename, file_obj, 'image/jpeg')) |
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 sqlalchemy import Table, Column, String, Integer, MetaData, func | |
def users_table(db): | |
table = Table('users', MetaData(db), | |
Column('id', Integer, primary_key=True, nullable=False), | |
Column('name', String, nullable=False), | |
Column('email', String, nullable=False), | |
Column('address', String, nullable=False), | |
Column('age', Integer), |
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 sqlalchemy import Table, Column, String, Integer, MetaData, func | |
def users_table(db): | |
table = Table('users', MetaData(db), | |
Column('id', Integer, primary_key=True, nullable=False), | |
Column('name', String, nullable=False), | |
Column('email', String, nullable=False), | |
Column('address', String, nullable=False), | |
Column('age', Integer), |
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 config | |
import time | |
from web3 import Web3, HTTPProvider | |
import web3 | |
import json | |
contract_address = config.CONTRACT_ADDRESS | |
wallet_private_key = config.WALLET_PRIVATE_KEY | |
wallet_address = config.WALLET_ADDRESS |
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
pragma solidity >=0.7.0 <0.9.0; | |
contract HeightValidation { | |
struct User { | |
uint userid; | |
uint height; | |
address validator; | |
} |