Skip to content

Instantly share code, notes, and snippets.

View jeftarmascarenhas's full-sized avatar
🎯
Focusing

Jeftar Mascarenhas jeftarmascarenhas

🎯
Focusing
View GitHub Profile
@jeftarmascarenhas
jeftarmascarenhas / eventFilterWithPagination.js
Created November 21, 2023 02:08 — forked from wschwab/eventFilterWithPagination.js
an attempt at implementing some kind of pagination to an Ethereum event filter
const eventFilterv5WithPagination = (contractAddress, erc20abi, _provider, numberOfResponses) => {
// creating the interface of the ABI
const iface = new ethers.utils.Interface(erc20abi.abi);
// intialize array for the logs
let logs = [];
// get latest block number
const latest = await provider.getBlockNumber();
// intialize a counter for which block we're scraping starting at the most recent block
let blockNumberIndex = latest;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol";
import "@openzeppelin/[email protected]/token/ERC721/IERC721.sol";
import "@openzeppelin/[email protected]/access/Ownable.sol";
import "@openzeppelin/[email protected]/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/[email protected]/token/ERC721/utils/ERC721Holder.sol";
contract FractionalizedNFT is ERC20, Ownable, ERC20Permit, ERC721Holder {
@jeftarmascarenhas
jeftarmascarenhas / marketplace.sol
Created April 14, 2022 01:26 — forked from dabit3/marketplace.sol
NFT Marketplace Smart Contract (V2)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "hardhat/console.sol";
contract NFTMarketplace is ERC721URIStorage {
@jeftarmascarenhas
jeftarmascarenhas / React Native Clear Cache
Created October 15, 2018 18:13 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@jeftarmascarenhas
jeftarmascarenhas / sketch-never-ending.md
Created January 6, 2018 21:29 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

var gulp = require('gulp'),
concat = require('gulp-concat'),
plumber = require('gulp-plumber'),
server = require('tiny-lr')(),
refresh = require('gulp-livereload'),
mocha = require('gulp-mocha'),
stylus = require('gulp-stylus'),
notify = require('gulp-notify'),
nodemon = require('gulp-nodemon'),
jshint = require('gulp-jshint'),