diff --git a/contracts/script/Deployer.s.sol b/contracts/script/Deployer.s.sol index d69ee47..b622d06 100644 --- a/contracts/script/Deployer.s.sol +++ b/contracts/script/Deployer.s.sol @@ -46,7 +46,7 @@ contract Deployer is Script, Utils { // Set ELF paths jobManager.setElfPath( - bytes32(0x3bbdaf6d405d7da83f503d17334267694f68d75376768f561b1374917539800f), "programs/square-root/elf" + bytes32(0x3bbdaf6d405d7da83f503d17334267694f68d75376768f561b1374917539800f), "target/sp1/square-root" ); vm.stopBroadcast(); diff --git a/programs/build.rs b/programs/build.rs index 7cd8a5e..109855e 100644 --- a/programs/build.rs +++ b/programs/build.rs @@ -15,7 +15,7 @@ fn main() { for program in programs.clone() { let args = BuildArgs { elf_name: program.clone(), - output_directory: format!("programs/{}/elf", program), + output_directory: "target/sp1".to_string(), ..Default::default() }; build_program_with_args(&program, args); diff --git a/programs/src/lib.rs b/programs/src/lib.rs index ca70d8c..f395ca4 100644 --- a/programs/src/lib.rs +++ b/programs/src/lib.rs @@ -1,5 +1,5 @@ /// The ELF (executable and linkable format) file for the square root program. -pub const SQUARE_ROOT_ELF: &[u8] = include_bytes!("../square-root/elf/square-root"); +pub const SQUARE_ROOT_ELF: &[u8] = include_bytes!("../../target/sp1/square-root"); #[cfg(test)] mod tests { diff --git a/zkvm-utils/src/sol.rs b/zkvm-utils/src/sol.rs index a20c2c5..6a15ddb 100644 --- a/zkvm-utils/src/sol.rs +++ b/zkvm-utils/src/sol.rs @@ -63,10 +63,10 @@ pub fn generate_solidity_files(program_names: Vec, opts: &Options) -> Re let programs: Vec = program_names .iter() .map(|name| { - let elf_path = format!("elf/{name}"); + let elf_path = format!("../target/sp1/{name}"); let elf = std::fs::read(elf_path).unwrap(); let program_id = ivm_zkvm::Sp1.derive_program_id(&elf).unwrap(); - let elf_path_sol = format!("programs/{name}/elf"); + let elf_path_sol = format!("target/sp1/{name}"); ProgramMetadata { name: name.clone(), program_id_hex: hex::encode(program_id),