0.2.9 • Published 5 years ago

etherscanner v0.2.9

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

EtherScanner

Module for parse ethereum transactions or block and get from them all Eth transfers (normal and "internal")

Warning

To work the module need this correction - https://github.com/ethereum/go-ethereum/pull/15297. So you must use geth version 1.7.3 or higher

NPM version

Installation

npm install etherscanner

Usage

const EtherScanner = require('etherscanner');
const Web3 = require('web3');

let web3Provider = new Web3.providers.HttpProvider(`http://localhost:6082`);
// or if web3 initialized before
let web3Provider = web3.currentProvider;

let etherScanner = EtherScanner(web3Provider);
Get all transfers by transaction hash
etherScanner.scanTransaction('0xc475f8bf9d2721b17f7c09944c2aa32ea943f452cb54ee0aefcb98ead0735274', (err, result) => {
	console.log(result);
});

result:

[{
	"hash": "0xc475f8bf9d2721b17f7c09944c2aa32ea943f452cb54ee0aefcb98ead0735274",
	"from": "0x1617d6e2dca84fec5c17f37d4141d2c4ec5c6d05",
	"to": "0xd1a2511bc222f38f463c62c9254faf7b710835e4",
	"value": 10000000000000000,
	"blockNumber": 1818075,
	"blockHash": "0x402a1df2fe61dcc83bec29c1202938e2fd739d97e614dbab351561dc04b01cd3",
	"isInternal": false,
	"type": ""
}, {
	"hash": "0xc475f8bf9d2721b17f7c09944c2aa32ea943f452cb54ee0aefcb98ead0735274",
	"from": "0xd1a2511bc222f38f463c62c9254faf7b710835e4",
	"to": "0x1617d6e2dca84fec5c17f37d4141d2c4ec5c6d05",
	"value": 12468329110548072,
	"blockNumber": 1818075,
	"blockHash": "0x402a1df2fe61dcc83bec29c1202938e2fd739d97e614dbab351561dc04b01cd3",
	"isInternal": true,
	"type": "CALL"
}]

type - "" || CALL || CREATION || SELFDESTRUCT

Get all transfers by block number
etherScanner.scanBlock(1822433, (err, result) => {
	console.log(result);
});
0.2.9

5 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

7 years ago

0.1.3

7 years ago