fil_actor_evm_state/v10/
types.rs

1// Copyright 2019-2022 ChainSafe Systems
2// SPDX-License-Identifier: Apache-2.0, MIT
3
4use crate::evm_shared::v10::address::EthAddress;
5use crate::evm_shared::v10::uints::U256;
6use cid::Cid;
7use fvm_ipld_encoding::RawBytes;
8use fvm_ipld_encoding::strict_bytes;
9use fvm_ipld_encoding::tuple::*;
10use fvm_shared3::econ::TokenAmount;
11
12#[derive(Serialize_tuple, Deserialize_tuple)]
13pub struct ConstructorParams {
14    /// The actor's "creator" (specified by the EAM).
15    pub creator: EthAddress,
16    /// The initcode that will construct the new EVM actor.
17    pub initcode: RawBytes,
18}
19
20pub type ResurrectParams = ConstructorParams;
21
22#[derive(Serialize_tuple, Deserialize_tuple)]
23pub struct DelegateCallParams {
24    pub code: Cid,
25    /// The contract invocation parameters
26    #[serde(with = "strict_bytes")]
27    pub input: Vec<u8>,
28    /// The original caller's Eth address.
29    pub caller: EthAddress,
30    /// The value passed in the original call.
31    pub value: TokenAmount,
32}
33
34#[derive(Serialize_tuple, Deserialize_tuple)]
35pub struct GetStorageAtParams {
36    pub storage_key: U256,
37}