Skip to content

Commit

Permalink
Added governance example to release-1.1 (#248)
Browse files Browse the repository at this point in the history
Update governance example Cargo.toml + examples README for release-1.1

---------

Co-authored-by: Angelo Capossele <[email protected]>
Co-authored-by: Victor Graf <[email protected]>
  • Loading branch information
3 people authored Sep 25, 2024
1 parent 56da0bd commit 7a47ea3
Show file tree
Hide file tree
Showing 35 changed files with 8,865 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Explore a more advanced interaction between [Steel] and a custom Ethereum smart
This example shows how the [Steel] library can be used to call multiple view functions of a contract.
This example generates a proof of a [Compound] cToken's APR (Annual Percentage Rate), showcasing the potential for on-chain verification of complex financial metrics.

## [DAO Governance with Off-chain Proofs](./governance/README.md)

This example contains a modified version of OpenZeppelin's [Governor] contract, which takes gas intensive signature verification off-chain whilst maintaining the same trust assumptions. This contract leverages RISC Zero as a [coprocessor] for generating and verifying these proofs.

[coprocessor]: https://www.risczero.com/news/a-guide-to-zk-coprocessors-for-scalability
[Governor]: https://docs.openzeppelin.com/contracts/4.x/api/governance#governor
[Steel]: ../steel
[Compound]: https://compound.finance/
26 changes: 26 additions & 0 deletions examples/governance/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# autogenerated test data
contracts/test/benchmarks/gas_data.csv

# Compiler files
cache/
out/

# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/*/11155111/
/broadcast/**/dry-run/

# Ignores anvil logs
anvil_logs.txt

# Autogenerated contracts
contracts/src/ImageID.sol
contracts/src/Elf.sol

# Cargo
target/

# Misc
.DS_Store
.idea
Loading

0 comments on commit 7a47ea3

Please sign in to comment.