Skip to content

Instantly share code, notes, and snippets.

View Ro5s's full-sized avatar
💭
👨🏻‍🍲 Thinking lowkey pizza

Ross Campbell Ro5s

💭
👨🏻‍🍲 Thinking lowkey pizza
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ro5s on github.
  • I am ro5s (https://keybase.io/ro5s) on keybase.
  • I have a public key ASBKsoUmHRq5eg_dzZysnoy0buM7umCah660Kvze9jgZUQo

To claim this, I am signing this object:

This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:QmfF2RJRNVGHzoNCyysSsExZJFbfKfjfLSfzdbMT7XBJTv ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.6;
pragma abicoder v2;
/// @notice Minimalist NFT minter.
contract MiniNFT {
uint256 public totalSupply;
string constant public name = "MiniNFT";
string constant public symbol "mNFT";
mapping(address => uint256) public balanceOf;
// optimizer: 4289999999
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.12;
// File @boringcrypto/boring-solidity/contracts/libraries/BoringMath.sol@v1.2.0
// License-Identifier: MIT
/// @notice A library for performing overflow-/underflow-safe math,
/// updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math).
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.2;
/**
* @dev Originally DeriswapV1Math
* @author Andre Cronje, LevX
*/
library MirinMath {
// computes square roots using the babylonian method
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.2;
interface IFlashBorrower {
/// @notice The flashloan callback. `amount` + `fee` needs to repayed to msg.sender before this call returns.
/// @param sender The address of the invoker of this flashloan.
/// @param token The address of the token that is loaned.
/// @param amount of the `token` that is loaned.
/// @param fee The fee that needs to be paid on top for this loan. Needs to be the same as `token`.
@Ro5s
Ro5s / BentoShareTest.sol
Created July 24, 2021 00:53
BentoShareTest.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.2;
interface IFlashBorrower {
/// @notice The flashloan callback. `amount` + `fee` needs to repayed to msg.sender before this call returns.
/// @param sender The address of the invoker of this flashloan.
/// @param token The address of the token that is loaned.
/// @param amount of the `token` that is loaned.
/// @param fee The fee that needs to be paid on top for this loan. Needs to be the same as `token`.
@Ro5s
Ro5s / useAaveToBentoStrategy.ts
Created August 1, 2021 16:41
stake xsushi atoken into xsushi bento shares
import { t } from '@lingui/macro'
import { AXSUSHI, XSUSHI } from '../../../constants'
import { ChainId, SUSHI_ADDRESS } from '@sushiswap/sdk'
import { tryParseAmount } from '../../../functions'
import { useBentoBalance } from '../../bentobox/hooks'
import { useActiveWeb3React } from '../../../hooks'
import { useTokenBalances } from '../../wallet/hooks'
import { StrategyGeneralInfo, StrategyHook, StrategyTokenDefinitions } from '../types'
import useBaseInariStrategy from './useBaseInariStrategy'
import { useEffect, useMemo } from 'react'
@Ro5s
Ro5s / useCreamToBentoStrategy.ts
Created August 1, 2021 16:42
stake cToken xsushi into bento xsushi shares
import { t } from '@lingui/macro'
import { CRXSUSHI, XSUSHI } from '../../../constants'
import { ChainId, SUSHI_ADDRESS } from '@sushiswap/sdk'
import { tryParseAmount } from '../../../functions'
import { useBentoBalance } from '../../bentobox/hooks'
import { useActiveWeb3React } from '../../../hooks'
import { useTokenBalances } from '../../wallet/hooks'
import { StrategyGeneralInfo, StrategyHook, StrategyTokenDefinitions } from '../types'
import useBaseInariStrategy from './useBaseInariStrategy'
import { useEffect, useMemo } from 'react'
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol";
/**
* @title ERC721Mock
* This mock just provides a public safeMint, mint, and burn functions for testing purposes
*/