Skip to content

Instantly share code, notes, and snippets.

@ixtgorilla
ixtgorilla / Web3Factory.ts
Created May 6, 2019 10:12
Web3Singletone template
import Web3 from 'web3'
import Window from './window'
// Singletone Class
class Web3Factory {
public web3: Web3
private static _instance: Web3Factory
// Private Constructor
private constructor(window: Window) {
@ixtgorilla
ixtgorilla / index.d.ts
Created April 8, 2019 17:20
web3 typescript memo
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
[parity]
mode = "last"
mode_timeout = 300
mode_alarm = 3600
auto_update = "critical"
release_track = "current"
public_node = false
no_download = false
no_consensus = false
no_persistent_txqueue = false
version: "3"
services:
geth-bootnode:
hostname: geth-bootnode
environment:
- nodekeyhex=08f0e1dee5c1b4645f3331a566009e41a4514b6cd28656d63d0449ecf812812b #Needs to be fix, so that the miners know the resulting enode id
build:
context: ./bootnode
ports:
- 30301:30301/udp
@ixtgorilla
ixtgorilla / ERC1400.go
Created December 11, 2018 12:00
[Memo] SecurityToken ERC List
/// @title IERC1400 Security Token Standard
/// @dev See https://github.com/SecurityTokenStandard/EIP-Spec
interface IERC1400 is IERC20 {
// Document Management
function getDocument(bytes32 _name) external view returns (string, bytes32);
function setDocument(bytes32 _name, string _uri, bytes32 _documentHash) external;
// Token Information
@ixtgorilla
ixtgorilla / 01.md
Created November 4, 2018 10:04
Studies

Ethereum Studies

1.Setup enviroments

ハンズオンでも使えることを想定、また今後の開発のスムーズさを想定してDockerベースのprivateネットワークでやる

truffle containers

@ixtgorilla
ixtgorilla / requestor_https.rb
Last active August 18, 2018 03:57
TwitterProfileCrawler
module Requestor
module Https
# Net::HTTP for Get Wrapper
#
# @param [String] url
# @return [Net]
def self.execute(url, attributes = {})
uri = URI.parse(url)
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
@ixtgorilla
ixtgorilla / smart_contract_study_memo.md
Last active June 1, 2018 18:27
ゴリメモ:スマートコントラクト読解メモ

原典

Smart Contracts 1994 by Nick Szabo http://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart.contracts.html

以下読解メモ

  • ぱっと見ポエムだが、windows95が存在していない時代に書かれたエッセイであることに留意。
  • 「マシンで実行する何か」を契約として捉え、加えて、暗号学などの分野を経済や法など現実社会に落とし込めないかという思考実験をしている
@ixtgorilla
ixtgorilla / settings.gs
Last active March 13, 2018 16:57
Scraper for Twitter followers count
// Aggregating Consts Object
function Settings() {
// defined col datas
this.COL_TW_ID_NUM = 1;
this.COL_TW_URL_NUM = 2;
this.COL_TW_FOLLOWER_NUM = 3;
// defined start row numbers
this.START_ROW_NUM = 2;
@ixtgorilla
ixtgorilla / enigma_commands.md
Created March 10, 2018 17:54
Enigma Catalyst Commands

Catalyst command options

$ catalyst --help

Catalyst "run" command options