Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 2.17 KB

File metadata and controls

50 lines (32 loc) · 2.17 KB

Examples

This directory includes three example uses of Steel. Each example demonstrates a different concept of Steel.

This introductory example illustrates how to use Steel to directly query the balanceOf function of any ERC20 token contract, providing a verifiable proof of a user's token balance.

Explore a more advanced interaction between Steel and a custom Ethereum smart contract. This counter contract utilizes off-chain Steel proofs to:

  • Increment a counter based on user-submitted proofs.
  • Verify ERC20 token ownership (minimum 1 token required) before incrementing.
  • Leverage RISC Zero as a coprocessor for efficient proof generation and verification.

This example illustrates how to use Steel to query and process events. This example computes the total USDT transferred in a block by evaluating the ERC20 Transfer event emitted by the corresponding contract.

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.

ERC20 Balance Query using op-steel

This example shows how to use op-steel to query the balanceOf function of an ERC20 token on OP, providing a proof that can be verified on OP.

This example shows how to use op-steel to query the balanceOf function of an ERC20 token on Ethereum and how the generated proof can be verified on OP.

This example shows how to use op-steel to query the balanceOf function of an ERC20 token on OP and how the generated proof can be verified on Ethereum.