Skip to content

Instantly share code, notes, and snippets.

Trevor Clarke TrevorJTClarke

Block or report user

Report or block TrevorJTClarke

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
View amberdata-websockets.js
const socket = new WebSocket(`wss://ws.web3api.io?x-api-key=${YOUR_API_KEY_HERE}`)
socket.addEventListener('open', event => {
console.log('Connection opened - ', event)
})
// Closed Connection
socket.addEventListener('close', event => {
console.log('Connection closed - ', event.data)
})
View token-holders.js
// View Full documentation here: https://docs.amberdata.io/reference/tokens#get-historical-token-holders
axios({
method:'get',
url: 'https://web3api.io/api/v1/tokens/ETHEREUM_ADDRESS_HERE/holders/historical?timeFrame=30d',
headers: { 'x-api-key': 'YOUR_API_KEY_HERE' }
}).then(res => {
// res data example:
// {
// "metadata": {
// "columns": ["timestamp", "timestamp.holder*"]
View token-transfers.js
axios({
method:'get',
url: 'https://web3api.io/api/v1/tokens/ETHEREUM_ADDRESS_HERE/transfers',
headers: { 'x-api-key': 'YOUR_API_KEY_HERE' }
}).then(res => {
// res data example:
// {
// "totalRecords": 3545827,
// "records": [
// {
View address-tokens.js
axios({
method:'get',
url: 'https://web3api.io/api/v1/addresses/ETHEREUM_ADDRESS_HERE/tokens',
headers: { 'x-api-key': 'YOUR_API_KEY_HERE' }
}).then(res => {
// res data example:
// {
// "totalRecords": "738",
// "records": [
// {
View address-transactions.js
axios({
method:'get',
url: 'https://web3api.io/api/v1/addresses/ETHEREUM_ADDRESS_HERE/transactions',
headers: { 'x-api-key': 'YOUR_API_KEY_HERE' }
}).then(res => {
// res data example:
{
"totalRecords": 3300291,
"records": [
{
View address-balance.js
axios({
method:'get',
url: 'https://web3api.io/api/v1/addresses/ETHEREUM_ADDRESS_HERE/account-balances/latest',
headers: { 'x-api-key': 'YOUR_API_KEY_HERE' }
}).then(res => {
// res data example:
// {
// "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
// "blockNumber": "7280439",
// "timestamp": 1551391449000,
View gas-percentiles.js
axios({
method:'get',
url: 'https://web3api.io/api/v1/transactions/gas/percentiles',
headers: { 'x-api-key': 'YOUR_API_KEY_HERE' }
}).then(res => {
// res data example:
// {
// "percentile_000": 0,
// "percentile_001": 0,
// "percentile_002": 0,
View gas-predictions.js
axios({
method:'get',
url: 'https://web3api.io/api/v1/transactions/gas/predictions',
headers: { 'x-api-key': 'YOUR_API_KEY_HERE' }
}).then(res => {
// res data example:
// {
// "average": {
// "gasPrice": 2000000000,
// "numBlocks": 4,
@TrevorJTClarke
TrevorJTClarke / Snapshot_4bytes
Last active Feb 28, 2019
snapshot of random sampling (127M out of 400M txns):
View Snapshot_4bytes
Count Signature % % (without 0x) Function
222,852,719 0x 55.96% ETH TRANSFER
87,649,468 0xa9059cbb 22.01% 49.97% transfer(address,uint256) OR many_msg_babbage(bytes1)
4,265,659 0x0a19b14a 1.07% 2.43% trade(address,uint256,address,uint256,uint256,uint256,address,uint8,bytes32,bytes32,uint256)
3,935,612 0x6ea056a9 0.99% 2.24% sweep(address,uint256)
3,297,997 0xef343588 0.83% 1.88% trade(uint256[8],address[4],uint8[2],bytes32[4])
3,247,646 0x0f2c9329 0.82% 1.85% split(address,address)
2,960,633 0x095ea7b3 0.74% 1.69% approve(address,uint256)
2,476,038 0x00000000 0.62% 1.41% -
2,470,649 0xa9b1d507 0.62% 1.41% makeWallet()
@TrevorJTClarke
TrevorJTClarke / sc_audit_vuln.csv
Last active Oct 28, 2018
Smart Contract Audit Vulnerabilities
View sc_audit_vuln.csv
Vulnerability Count
Integer Overflow 100,635
Message CALL to External Contract 84,964
Exception State 8,908
Multiple CALLs 518
DELEGATECALL to a User-Supplied Address 458
Unchecked CALL return value 224
Use of tx.origin 185
Integer Underflow 173
Ether Send 125
You can’t perform that action at this time.