Skip to content

Instantly share code, notes, and snippets.

1,289c1
< // SPDX-License-Identifier: MIT
<
< pragma solidity ^0.8.3;
<
< import "../interfaces/IHasVotes.sol";
< import "../interfaces/IVotingDelegates.sol";
<
< /**
< * Power to vote. Heavily based on Uni.
@macalinao
macalinao / multisig.json
Last active April 11, 2021 07:42
Celo Multisig ABI
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
@macalinao
macalinao / ubeswap.patch
Created February 27, 2021 21:39
Ubeswap diff
diff --git a/contracts/uniswapv2/README.md b/contracts/uniswapv2/README.md
index ffa15f4..88cbeba 100644
--- a/contracts/uniswapv2/README.md
+++ b/contracts/uniswapv2/README.md
@@ -1,13 +1,14 @@
# Uniswap V2 Area
-Code from [Uniswap V2](https://github.com/Uniswap/uniswap-v2-core/tree/27f6354bae6685612c182c3bc7577e61bc8717e3/contracts) with the following modifications.
+Code from [Sushiswap](https://github.com/sushiswap/sushiswap/tree/017ac93b1f6e970516652629a4d1bc47a8c584d7/contracts) with the following modifications.
const fetch = require("node-fetch");
const main = async () => {
const result = await fetch(
"https://api-consumer-client.doordash.com/graphql",
{
credentials: "omit",
headers: {
accept: "*/*",
"accept-language": "en-US",
{ pkgs, lib, config, ... }:
lib.mkMerge [
(
pkgs.callPackage (import ./common.nix) { }
)
(
lib.mkIf
(builtins.pathExists "${config.home.homeDirectory}/private_secrets")
(
import * as R from "ramda";
import { useState } from "react";
/**
* Default to displaying only pageSize items, but allow loadMore.
* @param items Items to return
* @param getId The serialized ID of the item.
* @param pageSize Number of items to display per page.
* @returns [filteredItems, loadMore, hasMore]
*/
[info] Compiling 1 Scala source to /Users/ian/proj/macalinao/scala-playground/target/scala-2.12/classes...
[error] /Users/ian/proj/macalinao/scala-playground/src/main/scala/pw/ian/playground/shapeless/BrokenSplitter.scala:87: ambiguous implicit values:
[error] both value scgen in object StatsAndPopGenerator of type => shapeless.Generic[pw.ian.playgroiund.shapeless.StatsAndPopGenerator.ScM]{type Repr = scala.collection.immutable.Map[Int,pw.ian.playgroiund.shapeless.StatsAndPopGenerator.Moments] :: shapeless.HNil}
[error] and value cgen in object StatsAndPopGenerator of type => shapeless.Generic[pw.ian.playgroiund.shapeless.StatsAndPopGenerator.ScS]{type Repr = Option[pw.ian.playgroiund.shapeless.StatsAndPopGenerator.Stat] :: shapeless.HNil}
[error] match expected type shapeless.Generic.Aux[MG,M]
[error] ] = genericGenerator
[error] ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 0 s, completed Nov 25, 2017 4:29:41 PM
[info] Compiling 1 Scala source to /Users/ian/proj/asunaio/alexandria/target/scala-2.12/classes...
[error] /Users/ian/proj/asunaio/alexandria/src/main/scala/asuna/alexandria/transforms/StatsAndPopGenerator.scala:73: ambiguous implicit values:
[error] both value scgen in object StatsAndPopGenerator of type => shapeless.Generic[asuna.proto.league.monoids.all_champions_sums.Scalars]{type Repr = scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna
@macalinao
macalinao / lol-champions.json
Created September 18, 2017 16:58
League of Legends Champions in JSON format
{
"data": {
"static_entry": {
"champions": [
{
"value": {
"id": 69,
"name": "Cassiopeia",
"blurb": "Cassiopeia is a terrifying creature - half woman, half snake - whose slightest glance brings death. The youngest daughter of one of Noxus' most influential families, she was once a beautiful and cunning temptress capable of manipulating the hardest...",
"tags": [
{
"data": {
"static_entry": {
"champions": [
{
"value": {
"id": 69,
"name": "Cassiopeia",
"image": {
"full": "Cassiopeia.png"