Skip to content

Instantly share code, notes, and snippets.

View enricobottazzi's full-sized avatar
😶‍🌫️

enrico.eth enricobottazzi

😶‍🌫️
View GitHub Profile
@enricobottazzi
enricobottazzi / range-check.circom
Created January 5, 2023 11:11
Circuit to test Range Check Overflow
pragma circom 2.1.0;
include "node_modules/circomlib/circuits/bitify.circom";
template Example () {
signal input a;
log(a);
// prevent overflow of leafSum
// el is the HTML DOM element into which the generated QR Code will be added
// data is the auth reponse (or any information) that has to be rendered inside the QR Code
function makeQr(el, data) {
return new QRCode(el, {
text: JSON.stringify(data),
width: 300,
height: 300,
colorDark: "#000",
colorLight: "#e9e9e9",