All Downloads are FREE. Search and download functionalities are using the official Maven repository.

state.contract.storage_slot.proto Maven / Gradle / Ivy

The newest version!
syntax = "proto3";

package proto;

/*-
 * ‌
 * Hedera Network Services Protobuf
 * ​
 * Copyright (C) 2018 - 2023 Hedera Hashgraph, LLC
 * ​
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ‍
 */

option java_package = "com.hederahashgraph.api.proto.java";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

import "basic_types.proto";

/**
 * The key of a storage slot. A slot is scoped to a specific contract number.
 * 
 * For each contract, its EVM storage is a mapping of 256-bit keys (or "words") to 256-bit values. 
 */
message SlotKey {
    /**
     * The number of the contract whose storage this slot belongs to.
     */
    ContractID contractID = 1;

    /**
     * The EVM key of this slot, when left-padded with zeros to form a 256-bit word.
     */
    bytes key = 2;
}

/**
 * The value of a contract storage slot. For the EVM, this is a single word.
 * 
 * Because we iterate through all the storage slots for an expired contract
 * when purging it from state, our slot values also include the words
 * of the previous and next keys in this contract's storage "list". 
 */
message SlotValue {
    /**
     * The EVM value in this slot, when left-padded with zeros to form a 256-bit word.
     */
    bytes value = 1;

    /**
     * The word of the previous key in this contract's storage list (if any).
     */
    bytes previous_key = 2;

    /**
     * The word of the next key in this contract's storage list (if any).
     */
    bytes next_key = 3;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy