Skip to content

Instantly share code, notes, and snippets.

View geggleto's full-sized avatar

Glenn Eggleton geggleto

View GitHub Profile
@geggleto
geggleto / verify-address.js
Created September 22, 2018 05:29
Express Service to verify Metamask Message and recover Ethereum Account used to sign
/**
Locally / Non-SSL: node verify-address.js local
**/
const LOCAL = (process.argv[2] === "local");
const fs = require('fs');
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const http = require('http');
const https = require('https');
pragma solidity ^0.4.18;
/// @title GeneScience implements the trait calculation for new kitties
/// @author Axiom Zen, Dieter Shirley <[email protected]> (https://github.com/dete), Fabiano P. Soriani <[email protected]> (https://github.com/flockonus), Jordan Schalm <[email protected]> (https://github.com/jordanschalm)
contract GeneScience {
bool public isGeneScience = true;
uint256 internal constant maskLast8Bits = uint256(0xff);
[{"constant":true,"inputs":[{"name":"_interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cfoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_preferredTransport","type":"string"}],"name":"tokenMetadata","outputs":[{"name":"infoUrl","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"promoCreatedCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":
@geggleto
geggleto / README.md
Created December 8, 2019 06:44
Crypto Voxel Scripting

CryptoVoxel Scripting Engine Library

Superduper proof of concept messaging mechanism for CryptoVoxels

Goals

  1. Teleporters
  2. Stretch goal .... Battle Bot Pit with Players controlling their bots for all to watch

Facets

import RedisClient from "../persistence/clients/RedisClient";
import { EntityManager } from '@mikro-orm/core';
import { FriendModel } from '../models/Friend';
import { QueryBus } from '../infrastructure/QueryBus';
import { ListFriendsQuery } from './Queries/ListFriendsQuery';
import { ListFriendsHandler } from './Handlers/ListFriendsHandler';
import {ListIncomingRequestsQuery} from "./Queries/ListIncomingRequestsQuery";
import {ListOutgoingRequestsQuery} from "./Queries/ListOutgoingRequestsQuery";
import {ListIncomingRequestsHandler} from "./Handlers/ListIncomingRequestHandler";
import {ListOutgoingRequestsHandler} from "./Handlers/ListOutgoingRequestHandler";