You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Check reputation first - will be changed later to have the user submit their `ProofOfAttendance`
let reputations = fetch_reputation_inner(params.clone())?;
let verified_reputations = reputations.iter().filter(|rep| rep.is_verified()).count();
if verified_reputations == 0{
returnErr("The user does not have any reputation".to_string())
}
then we compose an extrinsic (here comes your extrinsic). We hard-code metadata here. good enough for demo, but we have upstream issues in the backlog to defive this from metadata more easily
fork this repo and start your work based on the ab/node-template-sink branch
the demo setup is described here. should allow to fully reproduce the sub0 demo:
https://github.com/encointer/personhood-oracle/blob/ab/node-template-sink/README.md
make the Oracle write to frequency
refactor this RPC call to send an extrinsic to fequency instead of node_template
definition of rpc method:
personhood-oracle/enclave-runtime/src/rpc/worker_api_direct.rs
Line 239 in 6a518bc
here we verify encointer reputation:
personhood-oracle/enclave-runtime/src/rpc/worker_api_direct.rs
Lines 520 to 527 in 6a518bc
then we compose an extrinsic (here comes your extrinsic). We hard-code metadata here. good enough for demo, but we have upstream issues in the backlog to defive this from metadata more easily
personhood-oracle/enclave-runtime/src/rpc/worker_api_direct.rs
Line 548 in 6a518bc
CLI client
The easiest start will be to use our cli client for the demo:
refactor this according to your needs:
personhood-oracle/cli/src/personhood_oracle/commands/issue_node_template_xt.rs
Line 38 in 6a518bc
browser dapp
If you insist on a js dapp for the demo, you may find inspiration here: A while back, Encointer has integrated Integritee rpc's:
https://github.com/encointer/encointer-js/tree/master/packages/worker-api
noteworthy technical debt
with relevance to the frequency use case
longterm FYI:
The text was updated successfully, but these errors were encountered: