risc0 / risc0-ethereum

Integration of the RISC Zero verifiable compute platform with Ethereum and EVM chains.
https://risczero.com
Apache License 2.0
85 stars 17 forks source link

Fix deprecation in `erc20-counter` #293

Open Wollac opened 2 weeks ago

Wollac commented 2 weeks ago

The erc20-counter example currently dynamically creates either a block or a beacon commitment depending on its command line arguments. This uses the deprecated into_beacon_input:

// Finally, construct the input from the environment.
let evm_input = if let Some(beacon_api_url) = args.beacon_api_url {
    #[allow(deprecated)]
    env.into_beacon_input(beacon_api_url).await?
} else {
    env.into_input().await?
};

Instead, the intended behaviour in steel v1.1 is to use builder.beacon_api(url). However, as we are using a typed builder pattern, the following will not work as the type of the builder changes:

if let Some(beacon_api_url) = args.beacon_api_url { {
    builder = builder.beacon_api(beacon_api_url);
}
linear[bot] commented 2 weeks ago

WEB3-174 Fix deprecation in `erc20-counter`

mahmudsudo commented 1 week ago

can i take on this issue ?

nategraf commented 1 week ago

@mahmudsudo, sure! This is a good first issue