mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 10:41:57 +03:00
fix pedersen hash example
This commit is contained in:
parent
deb3847b8e
commit
8cbce25b5f
@ -1,12 +1,4 @@
|
||||
// syntax 1
|
||||
[main]
|
||||
const parameters: [group; 256] = [1; 256];
|
||||
|
||||
|
||||
// syntax 2
|
||||
[const]
|
||||
parameters: [group; 256] = [1; 256];
|
||||
|
||||
|
||||
[registers]
|
||||
r0: group = (1, 0)group;
|
@ -17,13 +17,11 @@ circuit PedersenHash {
|
||||
}
|
||||
}
|
||||
|
||||
// syntax 1: const main function input
|
||||
function main(const parameters: [group; 256]) -> group {
|
||||
// The 'pedersen-hash' main function.
|
||||
function main() -> group {
|
||||
let parameters = [1group; 256];
|
||||
let pedersen = PedersenHash::new(parameters);
|
||||
let hash_input: [bool; 256] = [true; 256];
|
||||
return pedersen.hash(hash_input)
|
||||
}
|
||||
|
||||
// syntax 2: main file global constant
|
||||
@parameter
|
||||
const parameters: [group; 256];
|
||||
|
Loading…
Reference in New Issue
Block a user