Skip to content

Instantly share code, notes, and snippets.

@nalinbhardwaj
nalinbhardwaj / TestTileContract.json
Last active April 12, 2022 03:28
exgrasia abi testing
[
{
"inputs": [],
"name": "logger",
"outputs": [
{ "internalType": "string", "name": "", "type": "string" },
{
"components": [
{ "internalType": "uint256", "name": "x", "type": "uint256" },
{ "internalType": "uint256", "name": "y", "type": "uint256" }
@nalinbhardwaj
nalinbhardwaj / plugin.js
Last active April 12, 2022 20:37
exgrasia Inventory Plugin
import BigNumber from "https://cdn.skypack.dev/bignumber.js";
class Plugin {
name = "Inventory";
description =
"Displays owned ERC20 and ERC721 that are enumerable + in tiles right now";
FETCH_OWNED_TOKEN_BASE_URL =
"https://api-kovan-optimistic.etherscan.io/api?module=account&action=tokentx&startblock=0&endblock=999999999&sort=asc&apikey=YourApiKeyToken&address=";
FETCH_TOKEN_BALANCE_BASE_URL =
"https://api-kovan-optimistic.etherscan.io/api?module=account&action=tokenbalance&tag=latest&apikey=YourApiKeyToken&contractaddress=";
@nalinbhardwaj
nalinbhardwaj / TinyCampfire.json
Last active April 17, 2022 14:07
exgrasia tile contract ABIs
[
{
"inputs": [
{
"internalType": "contract TinyWorld",
"name": "_connectedWorld",
"type": "address"
}
],
"stateMutability": "nonpayable",
@nalinbhardwaj
nalinbhardwaj / tester.circom
Last active May 23, 2022 11:11
Minimal bug tester for circom known/unknown analysis panic: https://github.com/iden3/circom/pull/57
pragma circom 2.0.3;
template TestEllipticCurveScalarMultiplyUnequal(n, k, b, x, p){
signal input in[2][k];
signal output out[2][k];
var Bits[250];
var BitLength;
for (var i = 0; i < 250; i++) {
Bits[i] = (x >> i) & 1;

Open this in zkREPL →

This file can be included into other zkREPLs with include "gist:aa82c6d9324baa1aaaf41ebd4966d912";