diff --git a/examples/oracle-example/src/lib.rs b/examples/oracle-example/src/lib.rs index 6c1b5b4..45e79d1 100644 --- a/examples/oracle-example/src/lib.rs +++ b/examples/oracle-example/src/lib.rs @@ -22,6 +22,7 @@ pub struct UserConfig {} #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub struct AuxData {} +// Oracle data is heading block_number_entropy as I expect that to be passed below to the evaluate function. pub const ORACLE_DATA: [&str; 1] = ["block_number_entropy"]; // TODO confirm this isn't an issue for audit diff --git a/templates/basic-template/cli/src/main.rs b/templates/basic-template/cli/src/main.rs index 2295ffc..dcb3d1f 100644 --- a/templates/basic-template/cli/src/main.rs +++ b/templates/basic-template/cli/src/main.rs @@ -29,8 +29,8 @@ async fn main() -> anyhow::Result<()> { ); // length is 1 if empty and can ignore, scale codec length - let pre = fs::read(oracle_data.clone()).unwrap(); - let oracle_option = if pre.len() == 1 { + let decoded_oracle_data = fs::read(oracle_data.clone()).unwrap(); + let oracle_option = if decoded_oracle_data.len() == 1 { None } else { Some(oracle_data.into())