Skip to content

Instantly share code, notes, and snippets.

@yongkangc
Last active August 31, 2022 10:10
Show Gist options
  • Save yongkangc/3e467b05e768f7cc8e03e81998944183 to your computer and use it in GitHub Desktop.
Save yongkangc/3e467b05e768f7cc8e03e81998944183 to your computer and use it in GitHub Desktop.
zkSBT
pragma circom 2.0.6;
include "circomlib/poseidon.circom";
// include "https://github.com/0xPARC/circom-secp256k1/blob/master/circuits/bigint.circom";
template Example () {
signal input a;
signal input b;
signal output c;
c <== a * b;
assert(a > 2);
component hash = Poseidon(2);
hash.inputs[0] <== a;
hash.inputs[1] <== b;
log("hash", hash.out);
}
component main { public [ a ] } = Example();
/* INPUT = {
"a": "5",
"b": "77"
} */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment