mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-08-25 19:31:11 +00:00
refactor(lee): type DEPLOY_SEED_DOMAIN_SEPARATOR as AccountId instead of [u8; 32]
This commit is contained in:
@@ -5,7 +5,8 @@ use lee_core::{
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
const DEPLOY_SEED_DOMAIN_SEPARATOR: [u8; 32] = *b"/LEZ/v0.3/LoaderDeploySeed/00000";
|
||||
const DEPLOY_SEED_DOMAIN_SEPARATOR: AccountId =
|
||||
AccountId::new(*b"/LEZ/v0.3/LoaderDeploySeed/00000");
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub enum Instruction {
|
||||
@@ -55,7 +56,7 @@ pub fn deploy_pda_seed(
|
||||
use risc0_zkvm::sha::{Impl, Sha256 as _};
|
||||
|
||||
let mut bytes = [0_u8; 32 + 32 + 4 + 32];
|
||||
bytes[0..32].copy_from_slice(&DEPLOY_SEED_DOMAIN_SEPARATOR);
|
||||
bytes[0..32].copy_from_slice(DEPLOY_SEED_DOMAIN_SEPARATOR.as_ref());
|
||||
let image_id_bytes: &[u8] =
|
||||
bytemuck::try_cast_slice(&image_id).expect("ProgramId should be castable to &[u8]");
|
||||
bytes[32..64].copy_from_slice(image_id_bytes);
|
||||
|
||||
Reference in New Issue
Block a user