Skip to content

Instantly share code, notes, and snippets.

View christinto's full-sized avatar
😎

Chris P christinto

😎
  • commx.io
  • Earth
View GitHub Profile
@christinto
christinto / Pair2.scilla
Created November 12, 2019 14:39 — forked from snowsledge/Pair2.scilla
Creating Structs using Pair of Pair
(* This contract demonstrate the creation of a Struct using Pair of a Pair *)
(* The Struct below currentmsginfo stores: *)
(* 1. A String that contains the message. *)
(* 2. An Address of the latest invoker of setHello transition. *)
(* 3. A Interger expressing the number of time setHello transition has been invoked. *)
import PairUtils
library Pairs
@christinto
christinto / Contract Verification & Publication
Created February 16, 2018 06:04 — forked from fabdarice/Contract Verification & Publication
Useful Solidity/Web3/Truffle commands
1) go to https://ropsten.etherscan.io/verifyContract?a=0xa32b21ba14fd476757e392db5d1bbc833eaedaf5
2) enter contract address, name, compiler
3) copy code of contract flatten out (delete import and replace by actual code)
4) truffle console
5) var Eth = require('ethjs')
6) Eth.abi.encodeParams(["uint256", "uint256", "uint256", "address", "uint256"], ["1508105298", "1508710098", "200", "0x3d208fabaf7e919985d5d2f068f28d6a9022e8d5", "5000000000000000000000000000"])
7) copy paste result of encodeParams without '0x'
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');