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
function tokenURI(uint256 _tokenId) | |
public | |
view | |
override | |
returns (string memory) | |
{ | |
CharacterAttributes memory charAttributes = nftHolderAttributes[ | |
_tokenId | |
]; |
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
/** | |
* @authors: [@ferittuncer, @hbarcelos] | |
* @reviewers: [] | |
* @auditors: [] | |
* @bounties: [] | |
* @deployments: [] | |
* SPDX-License-Identifier: MIT | |
*/ | |
pragma solidity ^0.8.9; |
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
/** | |
* @authors: [@ferittuncer, @hbarcelos] | |
* @reviewers: [] | |
* @auditors: [] | |
* @bounties: [] | |
* @deployments: [] | |
* SPDX-License-Identifier: MIT | |
*/ | |
pragma solidity ^0.8.9; |
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 { useWeb3React } from "@web3-react/core"; | |
import { BigNumber, Contract, ethers } from "ethers"; | |
import { useCallback, useEffect, useMemo, useState } from "react"; | |
import { useContract } from "./contracts/useContract"; | |
import { | |
IVonderBabyBoomer, | |
VonderCharacter, | |
VonderElement, | |
VonderGeneration, | |
} from "types/Vonder"; |
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/v3.1.0/contracts/token/ERC20/ERC20.sol"; | |
contract KORR is ERC20 { | |
constructor () public ERC20("Korr Token", "KORR") { | |
_mint(msg.sender, 1000000 * (10 ** uint256(decimals()))); | |
} | |
} |
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 Web3 = require('web3'); | |
const fs = require('fs'); | |
const { infuraProjectId, privateKeys, etherApiKey, bscApiKey } = JSON.parse(fs.readFileSync('.secret').toString().trim()); | |
// const infuraProjectId = `86f947e6d8ad4483a95d5a53864e7a8e`; | |
const binanceTestnetProvider = new HDWalletProvider({ | |
privateKeys: privateKeys, |
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
{ | |
pair(id: "0xf70a40749006c7952186666c92f32b8f5c2129f9") { | |
id | |
totalSupply | |
token0 { | |
symbol | |
derivedETH: derivedBNB | |
volume: tradeVolume | |
volumeUSD: tradeVolumeUSD | |
} |
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 aprToApy = (apr, frequency = BLOCKS_IN_A_YEAR) => ((1 + apr / 100 / frequency) ** frequency - 1) * 100 | |
const feeApyPerYear = aprToApy((((((pairVolumeUSD - (pair1wVolumeUSD ?? 0)) * 0.0025) / 7) * 365) / pairReserveUSD) * 100, 3650) / 100 | |
const feeApyPerMonth = feeApyPerYear / 12 | |
const feeApyPerDay = feeApyPerMonth / 30 | |
const feeApyPerHour = feeApyPerDay / blocksPerHour | |
const sushiPerBlock = pool?.owner?.sushiPerBlock / 1e18 || | |
(pool?.owner?.sushiPerSecond / 1e18) * averageBlockTime || | |
masterChefV1SushiPerBlock |
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 NETWORKS = { | |
'1': 'https://eth-mainnet.alchemyapi.io/v2/q1gSNoSMEzJms47Qn93f9-9Xg5clkmEC', | |
'3': 'https://eth-ropsten.alchemyapi.io/v2/cidKix2Xr-snU3f6f6Zjq_rYdalKKHmW', | |
'4': 'https://eth-rinkeby.alchemyapi.io/v2/XVLwDlhGP6ApBXFz_lfv0aZ6VmurWhYD', | |
'5': 'https://eth-goerli.alchemyapi.io/v2/Dkk5d02QjttYEoGmhZnJG37rKt8Yl3Im', | |
'10': 'https://mainnet.optimism.io', | |
'42': 'https://eth-kovan.alchemyapi.io/v2/6OVAa_B_rypWWl9HqtiYK26IRxXiYqER', | |
'56': 'https://bsc-dataseed.binance.org/', | |
'65': 'https://exchaintestrpc.okex.org', | |
'66': 'https://exchainrpc.okex.org', |