Skip to content

Instantly share code, notes, and snippets.

View zemse's full-sized avatar

soham zemse

View GitHub Profile
@zemse
zemse / esn.sol
Last active August 24, 2020 21:19
eraswapnetwork dependency contract abstracts
/// VERSION: 1.1.0
/// Please note that the following APIs (function name, args and return values) may be changed to
/// incorporate proper logic in ES whitepaper. Please recheck that your contracts use the latest version.
/// This gist is intended for reference purpose of the Era Swap Team and buidlers building dApps that
/// will be a part Era Swap Ecosystem.
pragma solidity 0.7.0;
/// KYC DApp
@zemse
zemse / main.py
Last active February 7, 2021 05:56
ISI Kolkata - Statistics Assignment 3 - Problem 9
# Question 9
#
# Suppose X1 and X2 are IID from the discrete uniform distribution on
# {1, 2, ... , 5}. Derive the sampling distribution of (X1 + X2)/2. Verify
# your result by means of simulation.
from random import randint
# number of trials, more the trials accuracy increases
TRIALS = 10000000
#!/bin/bash
# This script takes a remote repository and merges it into
# the current one as a subdirectory
set -e
if [ -z "$1" ]
then
echo "Usage:"
@zemse
zemse / Multicall.sol
Created May 18, 2021 01:19
This Multicall aggregates results from multiple contract constant function calls which are not all required to succeed.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// Copied and modified from https://github.com/makerdao/multicall/blob/e0c7d96c105b665b24ba9b7be22d9df22199de82/src/Multicall.sol
// This Multicall aggregates results from multiple contract constant function calls
// which are not all required to succeed.
contract Multicall {
struct Call {
address target;
@zemse
zemse / keybase.md
Created July 29, 2021 20:48
Keybase

Keybase proof

I hereby claim:

  • I am zemse on github.
  • I am zemse (https://keybase.io/zemse) on keybase.
  • I have a public key ASDHDlGoOgwFBJLripm1cMsoQbh_qo5LKkWZJivbhXHGHQo

To claim this, I am signing this object:

@zemse
zemse / README.md
Last active December 14, 2023 10:17
Calldata Optimisation

Calldata Optimisation

Reducing gas costs for L2 users by optimising calldata.

Motivation

Transaction fees on L2s like Optimism and Arbitrum involve paying the calldata gas costs for the batch submission on L1. And it accounts for good amount of gas fees.

For example, breakup of $4.19 Uniswap Trade on Arbitrum (explorer):

0x044067200be83613231a00ffb392a0a18614b8875144d1c47e694cdacd18256e

@zemse
zemse / rln-trusted-setup-ceremony_attestation.log
Created August 18, 2023 08:13
Attestation for RLN Trusted Setup Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm zemse-22412996 and I have contributed to the RLN Trusted Setup Ceremony MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (rln-withdraw)
Contributor # 49
Contribution Hash: e9fd187c 3dcdb243 b8c4d7f4 fa0bc661
3d1c0698 80911958 dd517374 c2285c51
a6d81c42 c41fcbe0 3586a1b7 e9b52003
5c820267 4965ee73 036d838d fbd0a491
@zemse
zemse / maci-v1-trusted-setup-ceremony_attestation.log
Created October 18, 2023 19:43
Attestation for Maci v1 Trusted Setup Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm zemse-22412996 and I have contributed to the Maci v1 Trusted Setup Ceremony.
The following are my contribution signatures:
Circuit # 1 (processmessages_6-8-2-3)
Contributor # 31
Contribution Hash: 511e40c0 be85bf28 900392f6 bbe5cccb
c5f286a8 cf4b32eb 5cfdac81 c8599d67
28ba6ec2 6d3685f5 76612ca9 844bb49d
e90bce23 3707765b cf789b72 1a38bdff
@zemse
zemse / email-wallet-trusted-setup-ceremony_attestation.log
Created November 16, 2023 09:34
Attestation for Email Wallet Trusted Setup Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm zemse-22412996 and I have contributed to the Email Wallet Trusted Setup Ceremony.
The following are my contribution signatures:
Circuit # 1 (emailwallet-account-creation)
Contributor # 22
Contribution Hash: fdba9e1d d43a8cc7 1f777c02 0970a3ad
bc2085b9 2db4a303 eb769e3a 6cb403c4
62fe23bf 16f27dc6 aa2f4106 38e72f6b
105178ec 0c0b86a5 ecdb33c6 1999422f