---
source: crates/sdk-derive/derive-core/src/storage_legacy.rs
expression: formatted
---
pub struct CustomBytes1 {}
impl CustomBytes1 {
    const SLOT: fluentbase_sdk::U256 = fluentbase_sdk::U256::from_limbs([
        0u64, 0u64, 0u64, 0u64,
    ]);
    fn get<SDK: fluentbase_sdk::SharedAPI>(sdk: &SDK) -> FixedBytes<32usize> {
        let key = Self::key(sdk);
        <FixedBytes<
            32usize,
        > as fluentbase_sdk::storage_legacy::DirectStorage<SDK>>::get(sdk, key)
    }
    fn set<SDK: fluentbase_sdk::SharedAPI>(sdk: &mut SDK, value: FixedBytes<32usize>) {
        let key = Self::key(sdk);
        <FixedBytes<
            32usize,
        > as fluentbase_sdk::storage_legacy::DirectStorage<SDK>>::set(sdk, key, value)
    }
    fn key<SDK: fluentbase_sdk::SharedAPI>(_sdk: &SDK) -> fluentbase_sdk::U256 {
        Self::SLOT
    }
}
pub struct CustomBytes2 {}
impl CustomBytes2 {
    const SLOT: fluentbase_sdk::U256 = fluentbase_sdk::U256::from_limbs([
        1u64, 0u64, 0u64, 0u64,
    ]);
    fn get<SDK: fluentbase_sdk::SharedAPI>(sdk: &SDK) -> FixedBytes<32usize> {
        let key = Self::key(sdk);
        <FixedBytes<
            32usize,
        > as fluentbase_sdk::storage_legacy::DirectStorage<SDK>>::get(sdk, key)
    }
    fn set<SDK: fluentbase_sdk::SharedAPI>(sdk: &mut SDK, value: FixedBytes<32usize>) {
        let key = Self::key(sdk);
        <FixedBytes<
            32usize,
        > as fluentbase_sdk::storage_legacy::DirectStorage<SDK>>::set(sdk, key, value)
    }
    fn key<SDK: fluentbase_sdk::SharedAPI>(_sdk: &SDK) -> fluentbase_sdk::U256 {
        Self::SLOT
    }
}
pub struct CustomBytes1 {}
impl CustomBytes1 {
    const SLOT: fluentbase_sdk::U256 = fluentbase_sdk::U256::from_limbs([
        2u64, 0u64, 0u64, 0u64,
    ]);
    fn get<SDK: fluentbase_sdk::SharedAPI>(sdk: &SDK) -> FixedBytes<321usize> {
        let key = Self::key(sdk);
        <FixedBytes<
            321usize,
        > as fluentbase_sdk::storage_legacy::StorageValueSolidity<
            SDK,
            FixedBytes<321usize>,
        >>::get(sdk, key)
    }
    fn set<SDK: fluentbase_sdk::SharedAPI>(sdk: &mut SDK, value: FixedBytes<321usize>) {
        use fluentbase_sdk::storage_legacy::StorageValueSolidity;
        let key = Self::key(sdk);
        <FixedBytes<
            321usize,
        > as fluentbase_sdk::storage_legacy::StorageValueSolidity<
            SDK,
            FixedBytes<321usize>,
        >>::set(sdk, key, value.clone());
    }
    fn key<SDK: fluentbase_sdk::SharedAPI>(_sdk: &SDK) -> fluentbase_sdk::U256 {
        Self::SLOT
    }
}
pub struct CustomBytes2 {}
impl CustomBytes2 {
    const SLOT: fluentbase_sdk::U256 = fluentbase_sdk::U256::from_limbs([
        3u64, 0u64, 0u64, 0u64,
    ]);
    fn get<SDK: fluentbase_sdk::SharedAPI>(sdk: &SDK) -> FixedBytes<321usize> {
        let key = Self::key(sdk);
        <FixedBytes<
            321usize,
        > as fluentbase_sdk::storage_legacy::StorageValueSolidity<
            SDK,
            FixedBytes<321usize>,
        >>::get(sdk, key)
    }
    fn set<SDK: fluentbase_sdk::SharedAPI>(sdk: &mut SDK, value: FixedBytes<321usize>) {
        use fluentbase_sdk::storage_legacy::StorageValueSolidity;
        let key = Self::key(sdk);
        <FixedBytes<
            321usize,
        > as fluentbase_sdk::storage_legacy::StorageValueSolidity<
            SDK,
            FixedBytes<321usize>,
        >>::set(sdk, key, value.clone());
    }
    fn key<SDK: fluentbase_sdk::SharedAPI>(_sdk: &SDK) -> fluentbase_sdk::U256 {
        Self::SLOT
    }
}
