Skip to content

Instantly share code, notes, and snippets.

View igorroncevic's full-sized avatar
👨‍🎓
Learning

Igor Rončević igorroncevic

👨‍🎓
Learning
View GitHub Profile
@SriVinayA
SriVinayA / install-vue-js-cli.md
Created June 17, 2019 16:41
Install vue-cli on Linux Systems

Install vue-cli on Linux Systems

The purpose of this Gist is to show how to install the vue-cli tool, as well as its dependencies, on Linux-based systems. I am using an Ubuntu 17.10, if you want to know the version of your Ubuntu, run the following statement in the terminal:

lsb_release -a

Introduction

@wschwab
wschwab / eventFilter.js
Last active August 22, 2023 07:41
a handmade Ethereum event filter that you should never really use
const eventFilter = (contractAddress, contractAbi, eventName, _provider) => {
const provider = _provider
// this will return an array with an object for each event
const events = contractAbi.abi.filter(obj => obj.type ? obj.type === "event" : false);
// getting the Transfer event and pulling it out of its array
const event = events.filter(event => event.name === eventName)[0];
// getting the types for the event signature
const types = event.inputs.map(input => input.type)
// knowing which types are indexed will be useful later
let indexedInputs = [];