Skip to content

Instantly share code, notes, and snippets.

View LucidSamuel's full-sized avatar
🎯
Focusing

Samuel Akinosho LucidSamuel

🎯
Focusing
View GitHub Profile
@LucidSamuel
LucidSamuel / App.js
Created July 28, 2022 12:33
solana-wallet
import React, { useEffect, useState } from "react";
import { StyleSheet, View } from "react-native";
import { Button, Title, Text } from "react-native-paper";
import {
Connection,
clusterApiUrl,
Keypair,
LAMPORTS_PER_SOL,
} from "@solana/web3.js";
@LucidSamuel
LucidSamuel / auto-git-upload.md
Created July 28, 2022 18:11
Automatically pushing to GIT

Automatically push an updated file whenever it is changed

Linux

  1. Make sure inotify-tools is installed (https://github.com/rvoicilas/inotify-tools)
  2. Configure git as usual
  3. Clone the git repository of interest from github and, if necessary, add file you want to monitor
  4. Allow username/password to be cached so you aren't asked everytime
git config credential.helper store
@LucidSamuel
LucidSamuel / article.md
Created August 19, 2022 09:54
Building a Solana Wallet Generator with React

Building a Solana Wallet Generator with React

Wallets are vital for getting into crypto or building any dAPP (decentralized app) as they fulfill several essential functions within the Web3 space. Therefore, in this article, we’ll dive deeper into the Solana ecosystem which is the world's first web-scale, open-source blockchain protocol, that enables developers around the world to build decentralized applications (dApps) on its ecosystem. Presently, Solana is capable of 50,000 TPS (transactions per second), making it the world's fastest blockchain.

Headings

  • Introduction -Prerequisites
  • Setting up the Boilerplate
  • Connecting to the Solana Network
@LucidSamuel
LucidSamuel / genericTransactions.sol
Created April 2, 2023 21:23
Plasma: GenericTransaction is a generic transaction format that makes few assumptions about the content of the transaction.
pragma solidity 0.5.11;
import "../utils/RLPReader.sol";
/**
* @title GenericTransaction
* @notice GenericTransaction is a generic transaction format that makes few assumptions about the
* content of the transaction. A transaction must satisy the following requirements:
* - It must be a list of 5 items: [txType, inputs, outputs, txData, metaData]
* - `txType` must be a uint not equal to zero
@LucidSamuel
LucidSamuel / recursion.ts
Last active June 29, 2023 17:40
A simple ZkProgram that uses recursion -
import {
isReady,
shutdown,
Field,
Experimental,
SelfProof,
verify,
} from 'snarkyjs';
const Factorial = Experimental.ZkProgram({