Skip to content

Instantly share code, notes, and snippets.

@Savio-Sou
Savio-Sou / semaphore-v4-ceremony_attestation.log
Created June 17, 2024 22:11
Attestation for Semaphore V4 Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm Savio-Sou-72797635 and I have contributed to the Semaphore V4 Ceremony.
The following are my contribution signatures:
Circuit # 1 (semaphorev4-1)
Contributor # 167
Contribution Hash:
42d09aa6 2eae9341 184c88dd ee67a0d0
4508f3da 873d66c6 5ccdbf2a f53e1ce8
30298cc0 303b1132 158e2af1 70f8c810
d9a9ae3a 9217685f ce7aa467 9dad7968
@Savio-Sou
Savio-Sou / NearBridge.sol
Created April 9, 2022 13:35
Review NearBridge.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8;
import "./AdminControlled.sol";
import "./INearBridge.sol";
import "./NearDecoder.sol";
import "./Ed25519.sol";
/// @dev Near light client
/// Deploy on Ethereum
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.3;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol";
import "./EthereumParser.sol";
import "./lib/EthUtils.sol";
import "./ethash/ethash.sol";
@Savio-Sou
Savio-Sou / Loan.sol
Created March 31, 2022 14:54
Review Aztec's loan-dapp-starter-kit
pragma solidity >= 0.5.0 <0.7.0;
import "@aztec/protocol/contracts/ERC1724/ZkAssetMintable.sol";
import "@aztec/protocol/contracts/libs/NoteUtils.sol";
import "@aztec/protocol/contracts/interfaces/IZkAsset.sol";
import "./LoanUtilities.sol";
// A peer-to-peer loan with hiddden notional, each loan contract represents a loan
// Inherit private asset contract "ZkAssetMintable.sol"
contract Loan is ZkAssetMintable {
@Savio-Sou
Savio-Sou / bonus.ts
Created March 28, 2022 08:34
Review snarkyjs-workshop/src/bonus.ts
// Recursive proof system
@proofSystem
class RollupProof extends ProofWithInput<RollupStateTransition> {
// Process deposit from L1
@branch static processDeposit(
pending: MerkleStack<RollupDeposit>, // deposit queue
accountDb: AccountDb // L2 account database
): RollupProof {
let before = new RollupState(pending.commitment, accountDb.commitment()); // current L2 state
let deposit = pending.pop(); // get deposit from queue
@Savio-Sou
Savio-Sou / deposit-RollupNC.sol
Created March 25, 2022 09:18
Review RollupNC
// Deposits ETH or ERC20 tokens onto L2
function deposit(
uint[2] memory pubkey,
uint amount,
uint tokenType
) public payable {
if ( tokenType == 0 ) {
// Reserved token type
require(
msg.sender == coordinator,