ProvableHQ / workshop

📜 A Starter Guide to Build ZK Applications 📜
330 stars 265 forks source link

Vote SnarkVM Error #22

Closed jayjayhust closed 1 year ago

jayjayhust commented 1 year ago

Firstly i create a propose by running: leo run propose "{title: 2077160157502449938194577302446445field, content: 1452374294790018907888397545906607852827800437field, proposer: aleo1kkk52quhnxgn2nfrcd9jqk7c9x27c23f2wvw7fyzcze56yahvcgszgttu2}" image_propose

Secondly i create a ballot according to the propose id by running: leo run new_ticket 4805818646167998554384321686438419164337692742816213982419333134280598662469field aleo1kkk52quhnxgn2nfrcd9jqk7c9x27c23f2wvw7fyzcze56yahvcgszgttu2

image_ticket

Finally i run the vote script listed below: leo run agree "{owner: aleo1kkk52quhnxgn2nfrcd9jqk7c9x27c23f2wvw7fyzcze56yahvcgszgttu2, gates: 0u64, pid: 4805818646167998554384321686438419164337692742816213982419333134280598662469field}"

but the console shows such error: image_vote Error [ECLI0377010]: Failed to execute the 'aleo run' command. SnarkVM Error: Expected a record input, found a plaintext input

how can i fix this input record issue? can anyone give some hints? thanks very much!

jayjayhust commented 1 year ago

i change the vote script into below: leo run agree "{owner: aleo1kkk52quhnxgn2nfrcd9jqk7c9x27c23f2wvw7fyzcze56yahvcgszgttu2.private, gates: 0u64.private, pid: 4805818646167998554384321686438419164337692742816213982419333134280598662469field.private, _nonce: 1637267040221574073903539416642641433705357302885235345311606754421919550724group.public}"

it works!