Skip to content

Instantly share code, notes, and snippets.

View helderjnpinto's full-sized avatar
☢️

ħþ helderjnpinto

☢️
View GitHub Profile
@helderjnpinto
helderjnpinto / IERC20.json
Created April 5, 2021 09:45
Simple ABI for ERC20
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
@helderjnpinto
helderjnpinto / balances query check.js
Last active March 10, 2021 10:41
eth-query / web3
const EthQuery = require('eth-query')
const axios = require('axios').default
// const _providerURL = 'https://rpc.tst.publicmint.io:8545/'
const _providerURL = 'http://localhost:8549/'
const engine = (payload, url = _providerURL) => {
const _headers = {
headers: {
'Content-Type': 'application/json',
@helderjnpinto
helderjnpinto / Socket reset
Created February 15, 2021 16:04
Socket reset
nioEventLoopGroup-3-3 | DEBUG | EthProtocolManager | Disconnecting from peer (0x01 TCP_SUBSYSTEM_ERROR), 1 peers left: EthPeers{connections=0x8e4edbad2073721578...}
2021-02-15 16:03:06.512+00:00 | vert.x-eventloop-thread-2 | DEBUG | RecursivePeerRefreshState | Received neighbours packet with 13 neighbours
2021-02-15 16:03:06.513+00:00 | vert.x-eventloop-thread-2 | DEBUG | RecursivePeerRefreshState | Initiating bonding round with 5 candidates
2021-02-15 16:03:06.628+00:00 | nioEventLoopGroup-3-4 | DEBUG | AbstractHandshakeHandler | Sending framed hello
2021-02-15 16:03:06.629+00:00 | nioEventLoopGroup-3-4 | DEBUG | AbstractHandshakeHandler | Successfully wrote hello message
2021-02-15 16:03:06.630+00:00 | nioEventLoopGroup-3-4 | DEBUG | DeFramer | Peer disconnected before sending HELLO. Reason: 0x04 TOO_MANY_PEERS
2021-02-15 16:03:06.630+00:00 | nioEventLoopGroup-3-4 | DEBUG | RlpxAgent | Failed to connect to peer 0x3f34008752dccff9ac41e2dc2e5b97813045adc7866f96fdfbd94431a5e71b30add1aeb67b26957425b695d080e391
@helderjnpinto
helderjnpinto / gist:faa4b09efe350dabe049c1a01823c83d
Created February 15, 2021 15:56
Caused by: org.hyperledger.besu.ethereum.p2p.rlpx.framing.FramingException: Snappy decompression failed
AbstractHandshakeHandler | Successfully wrote hello message
2021-02-15 15:28:14.771+00:00 | nioEventLoopGroup-3-5 | DEBUG | DeFramer | Peer disconnected before sending HELLO. Reason: 0x04 TOO_MANY_PEERS
2021-02-15 15:28:14.771+00:00 | nioEventLoopGroup-3-5 | DEBUG | RlpxAgent | Failed to connect to peer 0x2f29befcc8de01b085f061f9b3c4b1c1901f852327f9ebc285af0912f5272ddad4dcac128aaad8a8af40449f8eb4b8b8cbe9163a6bd12c8a1a0cd7ed2a0f07cb: org.hyperledger.besu.ethereum.p2p.network.exceptions.PeerDisconnectedException: Peer disconnected for reason: 0x04 TOO_MANY_PEERS
2021-02-15 15:28:14.777+00:00 | nioEventLoopGroup-3-6 | DEBUG | HandshakeHandlerOutbound | Wrote initial crypto handshake message to /100.26.22.218:30303.
2021-02-15 15:28:14.781+00:00 | nioEventLoopGroup-3-7 | DEBUG | HandshakeHandlerOutbound | Wrote initial crypto handshake message to /51.81.67.31:30304.
2021-02-15 15:28:14.807+00:00 | nioEventLoopGroup-3-2 | DEBUG | ApiHandler | Received Wire PING
2021-02-15 15:28:14.807+00:00 | nioEventLoopGroup-3
"alloc": {
"0x0000000000000000000000000000000000009999": {
"name": "Contract.sol",
"commit-hash": "34aa21f2f25e99ccfba94b2a55707d28857b48bb",
"solc-version": "0.5.10+commit.5a6ea5b1.Emscripten.clang",
"optimize": "false",
"code": "0x6080604052600436106101c25760003560e01c806385bc67f2116100f7578063b6c105ba11610095578063cce1d24211610064578063cce1d242146110e7578063ce612e67146111ea578063e7be4d8f1461125c578063ea2f2dfe146112ad576101c2565b8063b6c105ba14610f69578063bec3fa1714610fba578063c057058a1461102d578063c4d66de814611096576101c2565b806396100671116100d15780639610067114610d5d578063a79854bc14610d88578063a7ec634914610df1578063b2a1a02214610e8d576101c2565b80
....
Recv: _OS~1/
Recv: echo:Cannot open subdir
Recv: /
Recv: echo:Cannot open subdir
Recv: /
Recv: AI3M_B~1.GCO
Recv: AI3M_X~1.GCO
Recv: AI3M_S~1.GCO
Recv: End file list
Recv: ok
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreiebrklejllsvtsapqzjgnefmk747tcunnm5rggwuljq6rctz255ey ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
calcIntrinsic: encodedData => {
const txFee = new BigNumber('21000')
encodedData = hexToBytes(encodedData)
let countNonZeros = 0
let countZeros = 0
for (let i = 0; i < encodedData.length; i++) {
const dataElement = encodedData[i]
if (dataElement == '0') {
{
"config": {
"chainId": 1941,
"publicMintBlock": 0,
"contractSizeLimit": 2147483647,
"ibft2": {
"blockperiodseconds": 4,
"epochlength": 30000,
"requesttimeoutseconds": 8
}
@helderjnpinto
helderjnpinto / git_submodules.md
Created November 26, 2019 16:02 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.