# use alloy::primitives::{Address, U256};
# use alloy::sol_types::SolValue;
# use boundless_market::contracts::token::IERC20;
# use risc0_steel::{Commitment, Contract, ethereum::{EthEvmInput, ETH_SEPOLIA_CHAIN_SPEC}};
# use risc0_zkvm::guest::env;
# alloy::sol! {
# struct Journal {
# Commitment commitment;
# address tokenAddress;
# }
# }
# fn commitment() {
// GUEST PROGRAM
// Read the input from the guest environment.
let input: EthEvmInput = env::read();
let contract: Address = env::read();
let account: Address = env::read();
let evm_env = input.into_env(Ð_SEPOLIA_CHAIN_SPEC);
// Execute the view call; it returns the result in the type generated by the `sol!` macro.
let call = IERC20::balanceOfCall { account };
let balance = Contract::new(contract, &evm_env)
.call_builder(&call)
.call();
// Check that the given account holds at least 1 token.
assert!(balance >= U256::from(1));
// Commit the block hash and number used when deriving `view_call_env` to the journal.
let journal = Journal {
commitment: evm_env.into_commitment(),
tokenAddress: contract,
};
env::commit_slice(&journal.abi_encode());
# }