Skip to content

Instantly share code, notes, and snippets.

Tomoaki Sato TOMOAKI12345

Block or report user

Report or block TOMOAKI12345

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@TOMOAKI12345
TOMOAKI12345 / cancel_transaction_by_txId
Last active Jul 20, 2017
cancel transaction on Ethereum blockchain
View cancel_transaction_by_txId
// 1. replace {eth_tx_id_you_want_to_cancel_here} with the transaction id you want to cancel
// 2. $ node cancelTransaction.js
// [notice] you need to run this code before your transaction included into blockchain.
// Depends on network status, you can not cancel. Use this code with your own reponsibility. And there's no guarantee if this works.
var Web3 = require("web3");
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
var eth = web3.eth;
var jayson = require("jayson"); // need to install jayson. "$ npm install jayson"
@TOMOAKI12345
TOMOAKI12345 / import_json_appsscript.js
Created Mar 4, 2017 — forked from chrislkeller/import_json_appsscript.js
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
View import_json_appsscript.js
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
View ethereum_1mb_data_store_cost.txt
contract SimpleStorage {
string storedData;
function SimpleStorage() {
storedData = "asdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaiasdfasidfjaospdfijaias
@TOMOAKI12345
TOMOAKI12345 / ethereum_fullblock_cost.md
Last active Aug 25, 2016
ethereum full block cost (block gasLimit * gasPrice)
View ethereum_fullblock_cost.md

Cost for flooding network ?

eth.getBlock('latest') { difficulty: 67152520821340, extraData: "0xe4b883e5bda9e7a59ee4bb99e9b1bc", gasLimit: 4712388, gasUsed: 480752, hash: "0x021b08887e6e168ea22f130ff8dca3a9d0240363fb49e5a228be2627caaf90dd", logsBloom: "0x00000000040000020000080000060000000000000000000000800000000000020000040000000000000000000010400000000000004000080004000000202000000000000000000000400000000000000000000000040000408000000000000000900000000000000000004000000000000008000000000040028000000010000000000000000000000000400000020000400000000010000000000100001100020000040000000000002006000000000800010000000000000000000000000000004800008000000000000000000000000400000000000020010000000000000010000000000000000000000000080000010000000000000000000000000002",

@TOMOAKI12345
TOMOAKI12345 / ethc_eth_separate_daotoken.md
Created Jul 26, 2016
Separate DAO tokens between Ethereum and Ethereum classic
View ethc_eth_separate_daotoken.md

/* Add automatic transfer at the end of stack. deployed to

owner address is 0x55d6Ae4a67DFD7fe55eb319D519aF5596317E756

attacking https://etherscan.io/token/thedao-proposal/93

  • Bytecode Verification performed was compared on second iteration -
@TOMOAKI12345
TOMOAKI12345 / metamask_ja.md
Created Jul 13, 2016
Metamask japanese translation chrome store draft
View metamask_ja.md

EthereumのID管理プラグイン MetaMaskは、Ethereumを用いるあらゆる分散型のアプリケーションにアクセスしやすくするためのプラグインです。

あらゆるウェブサイトのJavascript のコンテキストに対して、EthereumのWeb3 APIを提供し、 それによって分散型アプリがブロックチェーンのデータをブラウザから読むことが出来るようになります。

普通のブラウザのコンテクストに対して機能を追加するため、Metamaskはウェブページに対しての読み書きの承認を必要とします。 あなたは他のChrome のプラグインに対して行う方法と同じ方法で、いつでもMetamaskの「ソースを見る」事ができます。 今後私たちはMetamaskのソースコードを公開し、だれでも検証する事ができるようになります。

View gist:83a60b93ce8f42e58651
var EventEmitter = require('events').EventEmitter;
var util = require('util');
function EventTest() {
// see http://d.hatena.ne.jp/Jxck/20110621/1308616949
EventEmitter.call(this);
}
// EventTestはEventEmitterを継承する
util.inherits(EventTest, EventEmitter);
You can’t perform that action at this time.