Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am aleph2012 on github.
* I am aleph2012 (https://keybase.io/aleph2012) on keybase.
* I have a public key ASDwzi95_tFoTUXvU4VgQrPDRTzlVSzN8ZaXG7UXxbrRtQo
To claim this, I am signing this object:
const Matic = require("maticjs").default
const config = require("./config")
const mtoken = "0xca3C863EE5a4aFD2FCcADC5427dDBd7C28B254b0" // test token address
const amount = "10000000000000000" // amount in wei (0.01 TEST)
const from = "0x3aC84Fd4f17606811d3Dd12A7Af9329DC7f5597A" // from address Account #1
// Create object of Matic
const matic = new Matic({
maticProvider: config.MATIC_PROVIDER,
const Matic = require("maticjs").default
const config = require("./config")
const mtoken = "0xca3C863EE5a4aFD2FCcADC5427dDBd7C28B254b0" // test token address
const amount = "10000000000000000" // amount in wei (0.01 TEST)
const from = "0x3aC84Fd4f17606811d3Dd12A7Af9329DC7f5597A" // from address Account #1
// Create object of Matic
const matic = new Matic({
maticProvider: config.MATIC_PROVIDER,
@aleph2012
aleph2012 / deposit.js
Created February 1, 2019 20:07
Deposit Example
const Matic = require('maticjs').default
const config = require('./config')
const token = '0x670568761764f53E6C10cd63b71024c31551c9EC' // test token address
const amount = '10000000000000000' // amount in wei (0.01 TEST)
const from = '0x3aC84Fd4f17606811d3Dd12A7Af9329DC7f5597A' // from address
// Create object of Matic
const matic = new Matic({
maticProvider: config.MATIC_PROVIDER,
parentProvider: config.PARENT_PROVIDER,
@aleph2012
aleph2012 / nodiak-crash.log
Created March 6, 2014 03:21
Crash log for 2i query in nodiak
uncaughtException date=Wed Mar 05 2014 19:06:59 GMT-0800 (PST),
pid=60517, uid=1123219521, gid=1876110778, cwd=/Users/aleph/sportstream/sportstream-server, execPath=/Users/aleph/.nvm/v0.8.23/bin/node,
version=v0.8.23,
argv=[/Users/aleph/.nvm/v0.8.23/bin/node, /Users/aleph/sportstream/sportstream-server/lib/app-server/server.js, debugstart, scbmac-local],
rss=100728832, heapTotal=83929344, heapUsed=50471616, loadavg=[1.458984375, 1.9521484375, 2.201171875],
uptime=712788,
trace=[column=21,
file=/Users/aleph/sportstream/sportstream-server/node_modules/nodiak/lib/helpers.js, function=Object.exports.partialStreamResponseCompiler, line=49, method=exports.partialStreamResponseCompiler, native=false, column=33,
file=/Users/aleph/sportstream/sportstream-server/node_modules/nodiak/lib/backends/http.js, function=HTTPBackend._bucket.twoi, line=319, method=_bucket.twoi, native=false, column=13,
file=/Users/aleph/sportstream/sportstream-server/node_modules/nodiak/lib/backends/http.js, function=HTTP
@aleph2012
aleph2012 / test-nodiak.js
Last active August 29, 2015 13:57
nodiak 2i bug
var nodiak = require('nodiak'),
riak = nodiak.getClient("http", "localhost", 8098);
var goodIndex =
{
name: "theGoodIndex",
value : "goodValue"
};
var badIndex =