Skip to content

Instantly share code, notes, and snippets.

View AmadiMichael's full-sized avatar
💻
Learning

Michael Amadi AmadiMichael

💻
Learning
View GitHub Profile
@AmadiMichael
AmadiMichael / privacy-pools-ceremony_attestation.log
Created February 23, 2025 11:49
Attestation for Privacy Pools Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm AmadiMichael-97467680 and I have contributed to the Privacy Pools Ceremony.
The following are my contribution signatures:
Circuit # 1 (withdraw)
Contributor # 81
Contribution Hash:
b30239df 0a43403f 424fd622 62d639c1
5db2cd82 ed89d034 e13f3cc6 5c32d81a
67b15666 80c0584d 5c3d8247 9c547914
ad2b372f 477180f2 86500493 cd52353f
@AmadiMichael
AmadiMichael / StraussShamir.sol
Created July 8, 2024 13:38
Strauss Shamir method with support for a custom number of precomputations by modifying the `bitsPerIteration` input
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
contract StraussShamir {
uint256 constant MAX_BIT_INDEX = 255;
///@dev calculating aP + bQ using Strauss Shamir method
/**
* When bitsPerIteration == 1, equation looks like
* ans = 0
@AmadiMichael
AmadiMichael / semaphore-v4-ceremony_attestation.log
Created June 11, 2024 16:11
Attestation for Semaphore V4 Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm AmadiMichael-97467680 and I have contributed to the Semaphore V4 Ceremony.
The following are my contribution signatures:
Circuit # 1 (semaphorev4-1)
Contributor # 30
Contribution Hash:
924fd977 bad6acf7 2a2ce22c fbb8cedf
4a37b948 6be607e4 ccd33fd2 7bcbd316
3b1e507d d3208f36 0ba82459 3a23dc74
4a2bc007 6fa9614e 921bf737 b44fb7fb
@AmadiMichael
AmadiMichael / AccountAccessHelper.sol
Last active January 16, 2024 00:01
AccountAccessHelper
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {console2} from "forge-std/Test.sol";
import {VmSafe} from "forge-std/Vm.sol";
import {StdAssertions} from "forge-std/StdAssertions.sol";
contract AccountAccessHelper is StdAssertions {
VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code")))));
@AmadiMichael
AmadiMichael / lib.rs
Created August 18, 2023 14:51
Search a file in rust
use std::fs;
use std::error::Error;
use std::env;
pub fn run(config: Config) -> Result<(), Box<dyn Error>>{
let contents = fs::read_to_string(config.filename)?;
let results = if config.case_sensitive {
search_case_sensitive(&config.query, &contents)
} else {
@AmadiMichael
AmadiMichael / lib.rs
Created August 9, 2023 10:19
Rust Lifetimes
#![warn(missing_debug_implementations, /* rust_2018_idioms , missing_docs */)]
#[derive(Debug)]
pub struct StrSplit<'a, D> {
remainder: Option<&'a str>,
delimiter: D,
}
impl<'a, D> StrSplit<'a, D> {
pub fn new(haystack: &'a str, delimiter: D) -> Self {