Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ use crate::bootloader::errors::InvalidTransaction;
use crate::bootloader::transaction::rlp_encoded::rlp::minimal_rlp_parser::{Rlp, RlpListDecode};
use crate::bootloader::transaction::rlp_encoded::transaction_types::EthereumTxType;
use ruint::aliases::B160;
use system_hooks::addresses_constants::{L2_INTEROP_ROOT_STORAGE_ADDRESS, SYSTEM_CONTEXT_ADDRESS};
use system_hooks::addresses_constants::{
L2_INTEROP_CENTER_ADDRESS, L2_INTEROP_ROOT_STORAGE_ADDRESS, SYSTEM_CONTEXT_ADDRESS,
};

/// ZKsync OS service (type 0x7d) transaction .
/// Used for system operations, such as importing interop roots.
Expand All @@ -18,8 +20,11 @@ pub(crate) struct ServiceTx<'a> {
salt: u64, // Some salt used by the server to identify service transactions. Ignored by ZKsync OS.
}

const SERVICE_DESTINATION_WHITELIST: &[B160] =
&[L2_INTEROP_ROOT_STORAGE_ADDRESS, SYSTEM_CONTEXT_ADDRESS];
const SERVICE_DESTINATION_WHITELIST: &[B160] = &[
L2_INTEROP_ROOT_STORAGE_ADDRESS,
SYSTEM_CONTEXT_ADDRESS,
L2_INTEROP_CENTER_ADDRESS,
];

pub const SERVICE_TX_TYPE: u8 = 0x7d;

Expand Down
5 changes: 5 additions & 0 deletions system_hooks/src/addresses_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ pub const L2_INTEROP_ROOT_STORAGE_ADDRESS_LOW: u32 = 0x10008;
pub const L2_INTEROP_ROOT_STORAGE_ADDRESS: B160 =
B160::from_limbs([L2_INTEROP_ROOT_STORAGE_ADDRESS_LOW as u64, 0, 0]);

// L2 interop center system contract
pub const L2_INTEROP_CENTER_ADDRESS_LOW: u32 = 0x1000d;
pub const L2_INTEROP_CENTER_ADDRESS: B160 =
B160::from_limbs([L2_INTEROP_CENTER_ADDRESS_LOW as u64, 0, 0]);

// Treasury contract used for "minting" base tokens on L2
pub const BASE_TOKEN_HOLDER_ADDRESS_LOW: u32 = 0x10011;
pub const BASE_TOKEN_HOLDER_ADDRESS: B160 =
Expand Down
Loading