Skip to content

Instantly share code, notes, and snippets.

View Franceshe's full-sized avatar

Frances He Franceshe

View GitHub Profile

Feel free to copy and paste this list into a README, issue or elsewhere in your project.

Audit prep checklist (reference)

  • Documentation (A plain english description of what you are building, and why you are building it. Should indicate the actions and states that should and should not be possible)
    • For the overall system
    • For each unique contract within the system
  • Clean code
  • Fix compiler warnings

Feel free to copy and paste this list into a README, issue or elsewhere in your project.

Audit prep checklist (reference)

  • Documentation (A plain english description of what you are building, and why you are building it. Should indicate the actions and states that should and should not be possible)
    • For the overall system
    • For each unique contract within the system
  • Clean code
  • Fix compiler warnings
@Franceshe
Franceshe / coinswap-design.md
Created May 16, 2023 17:45 — forked from chris-belcher/coinswap-design.md
Design for a CoinSwap Implementation for Massively Improving Bitcoin Privacy and Fungibility

Design for a CoinSwap Implementation for Massively Improving Bitcoin Privacy and Fungibility

25/5/2020

Abstract

Imagine a future where a user Alice has bitcoins and wants to send them with maximal privacy, so she creates a special kind of transaction. For anyone looking at the blockchain her transaction appears completely normal with her coins seemingly going from address A to address B. But in reality her coins end up in address Z which is entirely unconnected to either A or B.

Now imagine another user, Carol, who isn't too bothered by privacy and sends her bitcoin using a regular wallet which exists today. But because Carol's transaction looks exactly the same as Alice's, anybody analyzing the blockchain must now deal with the possibility that Carol's transaction actually sent her coins to a totally unconnected address. So Carol's privacy is improved even though she didn't change her behaviour, and perhaps had never even heard of this software.

@Franceshe
Franceshe / coinswap-design.md
Created May 16, 2023 17:45 — forked from chris-belcher/coinswap-design.md
Design for a CoinSwap Implementation for Massively Improving Bitcoin Privacy and Fungibility

Design for a CoinSwap Implementation for Massively Improving Bitcoin Privacy and Fungibility

25/5/2020

Abstract

Imagine a future where a user Alice has bitcoins and wants to send them with maximal privacy, so she creates a special kind of transaction. For anyone looking at the blockchain her transaction appears completely normal with her coins seemingly going from address A to address B. But in reality her coins end up in address Z which is entirely unconnected to either A or B.

Now imagine another user, Carol, who isn't too bothered by privacy and sends her bitcoin using a regular wallet which exists today. But because Carol's transaction looks exactly the same as Alice's, anybody analyzing the blockchain must now deal with the possibility that Carol's transaction actually sent her coins to a totally unconnected address. So Carol's privacy is improved even though she didn't change her behaviour, and perhaps had never even heard of this software.

Creating an ord compatible wallet with Sparrow Wallet

Users who cannot or have not yet setup the ord wallet can receive inscriptions and ordinals with alternative bitcoin wallets, as long as they are very careful about how they spend from that wallet.

This guide gives some basic steps on how to create a wallet with Sparrow Wallet which is compatible with ord and can be later imported into ord

⚠️⚠️ Warning!! ⚠️⚠️

As a general rule if you take this approach, you should use this wallet with the Sparrow software as a receive-only wallet. Do not spend any satoshis from this wallet unless you are sure you know what you are doing. You could very easily inadvertently lose access to your ordinals and inscriptions if you don't heed this warning.

Wallet Setup & Receiving

@Franceshe
Franceshe / FlashLoanReceiverBase.sol
Created February 1, 2023 17:46 — forked from DappaDanDev/FlashLoanReceiverBase.sol
Creating a Flash Loan using Aave
pragma solidity ^0.6.6;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/math/SafeMath.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/token/ERC20/IERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/token/ERC20/SafeERC20.sol";
import "./IFlashLoanReceiver.sol";
import "./ILendingPoolAddressesProvider.sol";
import "./Withdrawable.sol";
abstract contract FlashLoanReceiverBase is IFlashLoanReceiver, Withdrawable {
@Franceshe
Franceshe / diagrams.md
Created December 14, 2022 11:58 — forked from blackcater/diagrams.md
Markdown Diagrams

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.

@Franceshe
Franceshe / sales-bot.js
Created April 6, 2022 10:34 — forked from mertimus/sales-bot.js
Solana NFT bot
const solanaWeb3 = require('@solana/web3.js');
const { Connection, programs } = require('@metaplex/js')
const axios = require('axios');
// Check if the env variables have been set
if(!process.env.PROJECT_ADDRESS || !process.env.DISCORD_URL) {
console.log("Please set your environment variables!")
return;
}
@Franceshe
Franceshe / ARWEAVE.GQL.MD
Created January 14, 2022 14:37 — forked from TheLoneRonin/ARWEAVE.GQL.MD
Arweave Query Guide

Arweave GraphQL Guide

Retrieving Data

In order to retrieve data from Arweave, you can use the following example query to retrieve the entire transaction output.

query {
    transactions {
        cursor
@Franceshe
Franceshe / SolanaToolchainInstaller.sh
Created January 4, 2022 07:23 — forked from Quinncuatro/SolanaToolchainInstaller.sh
Shell Script to Install Node/Rust/Solana/Anchor/Metaplex/VS Code for Solana Web Development
#!/bin/bash
# Known working on a vanilla Ubuntu 20.04 install
# as of November 12 2021.
# Usage:
# $ sudo chmod +x ./SolanaToolchainInstaller.sh
# $ ./SolanaToolchainInstaller.sh
TIMESRUN=0