Skip to content

Instantly share code, notes, and snippets.

View emmaodia's full-sized avatar
🏠
Working from home

Emmanuel Oaikhenan emmaodia

🏠
Working from home
View GitHub Profile
import React, { useState, useEffect } from "react";
import { BiconomySmartAccount } from "@biconomy/account";
import {
IHybridPaymaster,
SponsorUserOperationDto,
PaymasterMode,
} from "@biconomy/paymaster";
import abi from "../ABI/tokenAbi.json";
import { ethers } from "ethers";
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract Coin is ERC20 {
address public minter;
uint256 constant public waitTime = 24 hours;
mapping(address => uint) lastMintBlock;
event Sent(address _from, address _to, uint _amount);

create a new repository on the command line

echo "# helloqo" >> README.md

git init

git add README.md

git commit -m "first commit"

@emmaodia
emmaodia / contracts..._coin.sol
Created September 8, 2021 05:22
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;
contract Coin {
// The keyword "public" makes variables
// accessible from other contracts
address public minter;
address public faucet;
mapping (address => uint) public balances;
@emmaodia
emmaodia / app.js
Created July 28, 2021 02:39
Using Google Fonts in Expo React Native
// import { AppLoading } from 'expo'
import AppLoading from 'expo-app-loading';
import React, { useState } from 'react';
import * as eva from '@eva-design/eva';
import * as Font from 'expo-font'
import { ApplicationProvider } from '@ui-kitten/compon
import { default as mapping } from './mapping.json';
const loadFonts = () => {
return Font.loadAsync({
import { useState, useEffect } from "react";
import axios from "axios";
function App() {
const [items, setItems] = useState([]);
useEffect(() => {
getData()
}, [])
@emmaodia
emmaodia / react.js
Last active June 21, 2021 14:06
Consuming Covalent API article
import logo from './logo.svg';
import './App.css';
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
import * as React from 'react';
import { StyleSheet, TouchableOpacity, View, LogBox, Button, Text } from 'react-native';
import { RootStackParamList } from '../types';
import { StackNavigationProp } from '@react-navigation/stack';
type ProfileScreenNavigationProp = StackNavigationProp<
RootStackParamList,
'Root'
>;
@emmaodia
emmaodia / repo.md
Created December 9, 2020 11:13
Push Github Repo

…or create a new repository on the command line echo "# xxxxx" >> README.md git init git add README.md git commit -m "first commit" git branch -M main git remote add origin https://github.com/emmaodia/xxxxx.git git push -u origin main

…or push an existing repository from the command line

@emmaodia
emmaodia / app-blockstack-auth.js
Created June 30, 2020 16:33
Blockstack Authentication for ReactJS Apps Using Hooks
import React, { useCallback } from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
import { Connect } from '@blockstack/connect';
import ReactBlockstack, { useBlockstack, didConnect } from 'react-blockstack';
import { appConfig } from './assets/constants';
import Layout from './Components/Layout';
import GuestBook from './Components/GuestBook';
ReactBlockstack({ appConfig });