Skip to content

Instantly share code, notes, and snippets.


Andrew W. Hill andrewxhill

View GitHub Profile
andrewxhill / ReadTablelandValue.sol
Last active November 29, 2022 00:24
Uses to return a single cell value from any table or sql request on Tableland
View ReadTablelandValue.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol";
interface IMidpoint {
function callMidpoint(uint64 midpointId, bytes calldata _data) external returns(uint256 requestId);
View addDeposit.js
// trigger bridge deposit for a user with their wallet
const onSubmit = () => {
.then(() => setDeposit(true))
.catch((err: Error) => alert(err.message));
andrewxhill / go.mod
Created March 16, 2021 21:36
View go.mod
go 1.15
require ( v0.4.5-0.20200819232101-baa577bf9422 // indirect v1.0.14 // indirect v2.6.5 // indirect v0.0.0-20160527075905-f5d03557ba30 // indirect
andrewxhill /
Last active June 5, 2022 13:42
Powergate Workshop

Introduction to Filecoin app building

This document:

Slides from intro presentation:

In this workshop, we are going to introduce you to Filecoin through the use of the Powergate. While you can develop using Lotus or other Filecoin implementations directly, the Powergate is designed to provide the necessary abstractions to build Filecoin storage into your application. Some features of the Powergate include fast data retrieval with IPFS serving as a caching layer, deal management, multi-tenant wallet APIs, and more. The system comes set up to run locally in Docker or deploy to your servers.

We'll cover the Powergate CLI and the Powergate JavaScript Client in the two parts of the workshop. To prepare, we encourage you to install a few things before we get started.

View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta name="description" content="Template cloned from">
<style type="text/css">
html, body {
height: 100%;

On chatting to people

Chat is not the same as conversation. When you tag someone using the "@" or if you send them a direct message, you may be directly forcing them to change their focus to your problem. While this is good for you, it can be bad for a healthy and productive community. Here are a couple of rules to abide.

  • Only "@" tag people's names in the following cases.
    • Your comment is urgent/time-sensitive and you need the help of the "@" target. What is urgent? You are running a production application with 100s of users facing a broken API, it's urgent. You are experimenting or taking part in a competition and want an answer quickly, it's not urgent.
    • Your comment has grown stale and you still need an answer that the "@" target can provide. What is stale? In most cases, more than 2 days seems reasonable or if it's a weekend, 3 or more.
    • You comment is in a channel or thread where the "@" target is not present but you need them aware.
  • Abide by the "no hello" rule at all times. Provide
View pseudo-bucket-example.ts
* Buckets
* You can now create Buckets for your User.
* Bucket contain raw files and documents.
const buckets = new Buckets(db.context);
const roots = await buckets.list();

Powergate Show & Tell


Create drop-in Filecoin API Management tools for systems and apps.

Key components:

  • Reputation Indices: A collection of data collected from the network for miner selection. Includes miner activity duration, slashing events, and deals.

Setup a new game of cmd-line tag!

Create a new game


sh "Game 1"