Skip to content

Instantly share code, notes, and snippets.

View 0xanmol's full-sized avatar
🏗️

anmolarora.eth 0xanmol

🏗️
View GitHub Profile
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;
import { OApp, Origin, MessagingFee } from "@layerzerolabs/oapp-evm/contracts/oapp/OApp.sol";
import { OAppOptionsType3 } from "@layerzerolabs/oapp-evm/contracts/oapp/libs/OAppOptionsType3.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
contract MyOApp is OApp, OAppOptionsType3 {
/// @notice Last string received from any remote chain
string public lastMessage = "starting message";
@0xanmol
0xanmol / anon-aadhaar-v2-trusted-setup-ceremony_attestation.log
Created June 11, 2024 09:03
Attestation for Anon Aadhaar V2 Trusted Setup Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm 0xanmol-53006995 and I have contributed to the Anon Aadhaar V2 Trusted Setup Ceremony.
The following are my contribution signatures:
Circuit # 1 (aadhaarverifier)
Contributor # 40
Contribution Hash: c3709177 7cf65026 b3390d99 22a4bf81
510c870e 95030b6d 913bcd78 370430c7
33594e44 29cbea89 ca8afbff c08afb06
fa540dde 91182915 a2b211e8 7b772d82
<html lang="en"><head><script async="" src="https://www.clarity.ms/eus-c/s/0.6.43/clarity.js"></script><script async="" src="https://snap.licdn.com/li.lms-analytics/insight.old.min.js"></script><script type="text/javascript" async="" src="https://snap.licdn.com/li.lms-analytics/insight.min.js" nonce="CSP-NONCE"></script><script async="" src="https://snap.licdn.com/li.lms-analytics/insight.old.min.js"></script><script type="text/javascript" async="" src="https://snap.licdn.com/li.lms-analytics/insight.min.js" nonce="CSP-NONCE"></script><script async="" src="https://snap.licdn.com/li.lms-analytics/insight.old.min.js"></script><script type="text/javascript" async="" src="https://snap.licdn.com/li.lms-analytics/insight.min.js" nonce="CSP-NONCE"></script><script async="" src="https://snap.licdn.com/li.lms-analytics/insight.old.min.js"></script><script type="text/javascript" async="" src="https://snap.licdn.com/li.lms-analytics/insight.min.js" nonce="CSP-NONCE"></script><script async="" src="https://snap.licdn.com/
// Specifies the version of Solidity, using semantic versioning.
// Learn more: https://solidity.readthedocs.io/en/v0.5.10/layout-of-source-files.html#pragma
pragma solidity ^0.7.0;
// Defines a contract named `HelloWorld`.
// A contract is a collection of functions and data (its state). Once deployed, a contract resides at a specific address on the Ethereum blockchain. Learn more: https://solidity.readthedocs.io/en/v0.5.10/structure-of-a-contract.html
contract HelloWorld {
// Declares a state variable `message` of type `string`.
// State variables are variables whose values are permanently stored in contract storage. The keyword `public` makes variables accessible from outside a contract and creates a function that other contracts or clients can call to access the value.
@0xanmol
0xanmol / .deps...npm...@openzeppelin...contracts-upgradeable...access...OwnableUpgradeable.sol
Created September 12, 2022 14:54
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
@0xanmol
0xanmol / DFS.txt
Created March 21, 2021 18:52
DFS Pseudocode (recursive implementation)
DFS(G, u)
u.visited = true
for each v ∈ G.Adj[u]
if v.visited == false
DFS(G,v)
init() //in init() function we run the DFS function on every node because the graph might have two different disconnected parts so to make sure that we cover every vertex, we can also run the DFS algorithm on every node.
{
For each u ∈ G
u.visited = false
@0xanmol
0xanmol / BFS.txt
Last active March 21, 2021 18:53
BFS Pseudocode
Input: A as the source node
BFS (G, A) //(G, A) is input, here G is the graph and A is the root node
let Q be queue.
Q.enqueue( A )
mark A as visited
while ( Q is not empty)
v = Q.dequeue( ) //v - visited nodes