Skip to content

Instantly share code, notes, and snippets.

const { AlphaRouter } = require("@uniswap/smart-order-router");
const {
Token,
CurrencyAmount,
TradeType,
Percent,
} = require("@uniswap/sdk-core");
const { ethers, BigNumber } = require("ethers");
const JSBI = require("jsbi");
const ERC20ABI = require("./abi.json");
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import React, { useState, useEffect } from 'react'
import { motion } from 'framer-motion'
import Cards from './Cards'
const hrHead = {
init: { x: -800, opacity: 0 },
enter: { x: 0, opacity: 1 },
}
export default function PortFolio() {
@kingdayx
kingdayx / modal.js
Last active January 17, 2021 23:35
import { motion } from 'framer-motion'
import React, { useState, useEffect } from 'react'
import styled from 'styled-components'
import ModalApp from './Modal'
const easing = [0.6, -0.05, 0.01, 0.99]
const Image = styled.img`
width: ${(props) => props.imgW} !important;
height: ${(props) => props.imgH} !important;
import { motion } from 'framer-motion'
import React from 'react'
import Modal from 'react-modal'
import styled from 'styled-components'
import { Carousel } from 'react-bootstrap'
const Hr = styled.hr`
color: linear-gradient(to right, green, blue);
`
import React, { useState, useEffect } from 'react'
import { Form } from 'react-bootstrap'
import styled from 'styled-components'
import { Formik } from 'formik'
import * as Yup from 'yup'
const Nfocused = `10px 10px 30px #5f1488, -10px -10px 50px #811cb8`
const focused = `inset -10px -10px 30px #5f1488, inset 10px 10px 50px #811cb8`
const Transit = styled.div`
@kingdayx
kingdayx / party.sol
Last active February 22, 2021 01:26
// SPDX-License-Identifier: GNU GPL v.3
pragma solidity 0.6.12;
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
contract OTRCPartyToken is ERC20Upgradeable {
using SafeMathUpgradeable for uint256;
uint256 totalDividendPoints = 0;
import React, { useCallback, useEffect, useState } from 'react'
import {
StyleSheet,
View,
Text,
TouchableOpacity,
Button,
Image,
} from 'react-native'
// SPDX-License-Identifier: GNU GPL v.3
pragma solidity ^0.6.2;
import "../../node_modules/@openzeppelin/contracts/math/SafeMath.sol";
contract OTRCPartyToken {
using SafeMath for uint256;
string public name = "OTRCPartyToken";
// SPDX-License-Identifier: GNU GPL v.3
pragma solidity ^0.6.2;
// Imports symbols from other files into the current contract.
// In this case, a series of helper contracts from OpenZeppelin.
// Learn more: https://solidity.readthedocs.io/en/v0.6.2/layout-of-source-files.html#importing-other-source-files
// IERC721 is the ERC721 interface that we'll use to make CryptoPizza ERC721 compliant
// More about ERC721: https://eips.ethereum.org/EIPS/eip-721
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";