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 { SqrtPriceMath, TickMath } from "@uniswap/v3-sdk"; | |
import Decimal from "decimal.js"; | |
import { ethers } from "ethers"; | |
import JSBI from "jsbi"; | |
export const JSBI_ZERO = JSBI.BigInt(0); | |
export function getSqrtPriceAtTick(tick: string): string { | |
return new Decimal(1.0001).pow(tick).sqrt().mul(new Decimal(2).pow(96)).toFixed(0); | |
} |
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: UNLICENSED | |
pragma solidity ^0.8.9; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import { CoffeeMock } from "./Coffee_NFT.sol"; | |
contract Coffee { | |
struct Donate { | |
uint256 tokensDonated; | |
uint256 noOfDonations; |
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: GPL-3.0 | |
pragma solidity >=0.7.0 <0.8.0; | |
/** | |
* @title Storage | |
* @dev Store & retrieve value in a variable | |
*/ | |
contract Storage { |
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; | |
contract first { | |
enum Reg { // custom datatype for constant values | |
onsite, // 0 | |
online // 1 | |
} | |
struct Student { // custom dataType for students | |
uint RollNo; | |
string 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
pragma solidity ^0.6.0; | |
contract first { | |
enum Reg { // custom datatype for constant values | |
onsite, // 0 | |
online // 1 | |
} | |
struct Student { // custom dataType for students | |
uint RollNo; | |
string 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
pragma solidity ^0.6.0; | |
contract first { | |
enum Reg { // custom datatype for constant values | |
onsite, // 0 | |
online // 1 | |
} | |
struct Student { // custom dataType for students | |
uint RollNo; | |
string 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
//code here |