This folder records significant architectural decisions for the Starboard Finance system.
ADRs live here rather than inside individual component folders because:
| import requests | |
| import pandas as pd | |
| from datetime import date, timedelta | |
| def cryptofees(_query_str): | |
| fees_requests = requests.get("https://cryptofees.info/api/v1/feesByDay?" + _query_str) | |
| json_data = fees_requests.json() | |
| _df = pd.json_normalize(json_data['data'], record_path=['data'], meta=['id'], errors='ignore') |
| import { Address, BigInt, BigDecimal, dataSource } from "@graphprotocol/graph-ts" | |
| import { UniswapV2Pair } from '../generated/Pool/UniswapV2Pair' | |
| import { UniswapV2Factory } from '../generated/Pool/UniswapV2Factory' | |
| let UNISWAP_FACTORY = Address.fromString('0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f') | |
| let EIGHTEEN_DECIMALS = BigInt.fromI32(10).pow(18).toBigDecimal() | |
| let wethAddress = new Map<string, Address>() | |
| wethAddress.set('rinkeby', Address.fromString('0xc778417E063141139Fce010982780140Aa0cD5Ab')) | |
| wethAddress.set('mainnet', Address.fromString('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2')) |
| // SPDX-License-Identifier: MIT | |
| pragma solidity >=0.7.0 <0.9.0; | |
| interface IDai { | |
| function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; | |
| // function permit(address holder, address spender, uint256 nonce, uint256 expiry, | |
| // bool allowed, uint8 v, bytes32 r, bytes32 s) external; | |
| function transferFrom(address, address, uint256) external returns (bool); | |
| function balanceOf(address) external view returns (uint256); |
| import { Address, BigInt, BigDecimal, dataSource } from "@graphprotocol/graph-ts" | |
| import { UniswapV2Pair } from '../generated/Pool/UniswapV2Pair' | |
| import { UniswapV2Factory } from '../generated/Pool/UniswapV2Factory' | |
| let UNISWAP_FACTORY = Address.fromString('0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f') | |
| let EIGHTEEN_DECIMALS = BigInt.fromI32(10).pow(18).toBigDecimal() | |
| let wethAddress = new Map<string, Address>() | |
| wethAddress.set('rinkeby', Address.fromString('0xc778417E063141139Fce010982780140Aa0cD5Ab')) | |
| wethAddress.set('mainnet', Address.fromString('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2')) |
| //SPDX-License-Identifier: MIT | |
| pragma solidity ^0.7.0; | |
| import "@openzeppelin/contracts/token/ERC777/IERC777.sol"; | |
| import "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol"; | |
| import "@openzeppelin/contracts/introspection/IERC1820Registry.sol"; | |
| abstract contract ERC777Receiver is IERC777Recipient { | |
| IERC1820Registry constant internal ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); |
| import CarbonPlugin from '@burner-wallet/carbon-plugin'; | |
| import LinkdropPlugin from '@linkdrop/burner-plugin'; | |
| //... | |
| const BurnerWallet = () => | |
| <ModernUI | |
| title="Basic Wallet" | |
| core={core} | |
| plugins={[ |
| import { xdai, dai, eth, ERC20Asset } from '@burner-wallet/assets'; | |
| import Exchange, { Uniswap, XDaiBridge } from '@burner-wallet/exchange'; | |
| //... | |
| const mkr = new ERC20Asset({ | |
| id: 'mkr', | |
| name: 'Maker', | |
| address: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2', | |
| network: '100', | |
| priceSymbol: 'MKR', |
| import { xdai, dai, eth, ERC20Asset } from '@burner-wallet/assets'; | |
| import Exchange, { Uniswap, XDaiBridge } from '@burner-wallet/exchange'; | |
| //... | |
| const mkr = new ERC20Asset({ | |
| id: 'mkr', | |
| name: 'Maker', | |
| address: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2', | |
| network: '100', | |
| priceSymbol: 'MKR', |
| import ENSPlugin from '@burner-wallet/ens-plugin'; | |
| import ERC681Plugin from '@burner-wallet/erc681-plugin'; | |
| import RecentAccountsPlugin from '@burner-wallet/recent-accounts-plugin'; | |
| import MetamaskPlugin from '@burner-wallet/metamask-plugin'; | |
| //... | |
| const BurnerWallet = () => | |
| <ModernUI | |
| title="Basic Wallet" |