Skip to content

Instantly share code, notes, and snippets.

View jp4g's full-sized avatar
🖥️

Jack Gilcrest jp4g

🖥️
View GitHub Profile
@jp4g
jp4g / broken_hash.nr
Last active September 27, 2024 06:30
sha256_var producing wrong hash
#[test]
fn test_sha256_var_wrong_hash() {
// nargo test --silence-warnings --show-output
// nargo 0.34.0+359caafac5e489901d9ff02b08d1a688178d9b0a
let preimage = [
29, 81, 165, 84, 243, 114, 101, 37, 242, 146, 127, 99, 69, 145, 39, 72, 213, 39, 253, 179, 218, 37, 217, 201, 172, 93, 198, 50, 249, 70, 15, 30, 162, 112, 187, 40, 140, 9, 236, 53, 32, 44, 38, 163, 113, 254, 192, 197, 44, 89, 71, 130, 169, 242, 17, 211, 214, 72, 19, 178, 186, 168, 147, 127, 99, 101, 252, 227, 8, 147, 150, 85, 97, 158, 17, 107, 218, 244, 82, 113, 247, 91, 208, 214, 60, 244, 87, 137, 173, 201, 130, 18, 66, 56, 198, 149, 207, 189, 175, 120, 123, 224, 177, 167, 251, 159, 143, 110, 68, 183, 189, 70, 126, 32, 35, 164, 44, 30, 44, 12, 65, 18, 62, 239, 242, 2, 248, 104, 2, 178, 64, 28, 126, 36, 137, 24, 14, 116, 91, 98, 90, 159, 218, 102, 45, 11, 110, 223, 245, 184, 52, 99, 59, 245, 136, 175, 3, 72, 164, 146, 145, 116, 22, 66, 24, 49, 193, 121, 3, 60, 37, 41, 97, 3, 190, 66, 195, 225, 63, 46, 3, 118, 4, 208, 15, 1, 40, 2
@jp4g
jp4g / gist:22dd63ef7547e392b9f8c306ee632a32
Last active September 28, 2022 08:53
Planned Awesome-Circom GitBook
  • Content provided as a GitBook
  • Sections
    • We need to have the GitBook up as early next week as possible to post in the Iden3 channel as they will assist with content
    • Intro
      • Starting the journey into ZK Dev
        • cryptobook
        • mathematical requirement
        • solidity requirement
  • managing expectations
@jp4g
jp4g / magicEdenParser.js
Last active June 13, 2024 15:55 — forked from mertimus/magicEdenParser.js
Magic Eden On-Chain Transaction Parsing
const solanaWeb3 = require('@solana/web3.js');
// replace with private paid RPC for best functionality
const rpc = "https://ssc-dao.genesysgo.net";
// magic eden v2 solana program ID
const magicEdenPID = new solanaWeb3.PublicKey("M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K");
// only return confirmed transactions
const solana = new solanaWeb3.Connection(rpc, 'confirmed');
/**
@jp4g
jp4g / eth-bank.sol
Created February 14, 2019 17:49
Ethereum Solidity File
pragma solidity >=0.4.22 <0.6.0;
/**
* Interface for bank contract
* Topics: How to use and implement an interface, syntax
**/
interface Bank_Interface {
/**
* Deposit value into the bank