Skip to content

Instantly share code, notes, and snippets.

View wighawag's full-sized avatar

Ronan Sandford wighawag

View GitHub Profile
@wighawag
wighawag / machine.js
Last active June 22, 2020 15:49
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'wallet',
type: "parallel",
context: {
address: undefined,
},
states: {
builtin: {
initial: 'unknown',
@wighawag
wighawag / machine.js
Created June 22, 2020 11:28
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@wighawag
wighawag / machine.js
Last active June 21, 2020 09:30
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@wighawag
wighawag / machine.js
Last active June 22, 2020 22:07
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'wallet',
type: "parallel",
context: {
address: undefined,
vendor: undefined,
},
states: {
builtin: {
@wighawag
wighawag / machine.js
Created June 20, 2020 17:01
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'planet',
initial: 'unknown',
states: {
unknown: {
on: {
PROBE: 'probing',
},
},
probing: {
@wighawag
wighawag / machine.js
Last active June 20, 2020 13:37
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'wallet',
type: "parallel",
context: {
address: undefined,
},
states: {
builtin: {
initial: 'unknown',
@wighawag
wighawag / ERC165Query.sol
Created May 30, 2019 21:09
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.20+commit.3155dd80.js&optimize=false&gist=
pragma solidity ^0.4.20;
contract ERC165Query {
bytes4 constant InvalidID = 0xffffffff;
bytes4 constant ERC165ID = 0x01ffc9a7;
function doesContractImplementInterface(address _contract, bytes4 _interfaceId) external view returns (bool) {
uint256 success;
uint256 result;
did:muport:QmWobx7edwuj8D7iiBMF3L6Mzt91jzZq5dLgEV1fAyHkPV
0x00 0 STOP
0x01 3 ADD
0x02 5 MUL
0x03 3 SUB
0x04 5 DIV
0x05 5 SDIV
0x06 5 MOD
0x07 5 SMOD
0x08 8 ADDMOD
0x09 8 MULMOD
0xAe6168Fd940F30A31Fb31F60Ce86291AF26ef31B