Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
### Added

- [#6057](https://github.com/ChainSafe/forest/issues/6057) Added `--no-progress-timeout` to `forest-cli f3 ready` subcommand to exit when F3 is stuck for the given timeout.
- [#6000](https://github.com/ChainSafe/forest/pull/6000) Add support for the `Filecoin.StateDecodeParams` API methods to enable decoding actors method params.

### Changed

Expand Down
32 changes: 16 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ educe = { version = "0.6.0", features = ["Debug"], default-features = false }
enumflags2 = "0.7"
ethereum-types = { version = "0.15", features = ["ethbloom"] }
ez-jsonrpc-types = "0.5"
fil_actor_account_state = { version = "24" }
fil_actor_cron_state = { version = "24" }
fil_actor_datacap_state = { version = "24" }
fil_actor_eam_state = { version = "24" }
fil_actor_ethaccount_state = { version = "24" }
fil_actor_evm_state = { version = "24" }
fil_actor_init_state = { version = "24" }
fil_actor_market_state = { version = "24" }
fil_actor_miner_state = { version = "24" }
fil_actor_multisig_state = { version = "24" }
fil_actor_paych_state = { version = "24" }
fil_actor_power_state = { version = "24" }
fil_actor_reward_state = { version = "24" }
fil_actor_system_state = { version = "24" }
fil_actor_verifreg_state = { version = "24" }
fil_actors_shared = { version = "24", features = ["json"] }
fil_actor_account_state = { version = "24.1.2" }
fil_actor_cron_state = { version = "24.1.2" }
fil_actor_datacap_state = { version = "24.1.2" }
fil_actor_eam_state = { version = "24.1.2" }
fil_actor_ethaccount_state = { version = "24.1.2" }
fil_actor_evm_state = { version = "24.1.2" }
fil_actor_init_state = { version = "24.1.2" }
fil_actor_market_state = { version = "24.1.2" }
fil_actor_miner_state = { version = "24.1.2" }
fil_actor_multisig_state = { version = "24.1.2" }
fil_actor_paych_state = { version = "24.1.2" }
fil_actor_power_state = { version = "24.1.2" }
fil_actor_reward_state = { version = "24.1.2" }
fil_actor_system_state = { version = "24.1.2" }
fil_actor_verifreg_state = { version = "24.1.2" }
fil_actors_shared = { version = "24.1.2", features = ["json"] }
flate2 = "1"
flume = { workspace = true }
fs_extra = "1"
Expand Down

This file was deleted.

55 changes: 0 additions & 55 deletions src/lotus_json/actor_states/methods/init_constructor_params.rs

This file was deleted.

78 changes: 0 additions & 78 deletions src/lotus_json/actor_states/methods/init_exec4_params.rs

This file was deleted.

70 changes: 0 additions & 70 deletions src/lotus_json/actor_states/methods/init_exec_params.rs

This file was deleted.

20 changes: 0 additions & 20 deletions src/lotus_json/actor_states/methods/mod.rs

This file was deleted.

6 changes: 6 additions & 0 deletions src/lotus_json/actors/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright 2019-2025 ChainSafe Systems
// SPDX-License-Identifier: Apache-2.0, MIT

use super::*;
mod params;
mod states;
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
// Copyright 2019-2025 ChainSafe Systems
// SPDX-License-Identifier: Apache-2.0, MIT

use super::*;
use crate::shim::address::Address;
use jsonrpsee::core::Serialize;
use paste::paste;
use schemars::JsonSchema;
use serde::Deserialize;

#[derive(Serialize, Deserialize, JsonSchema, Debug, Clone, PartialEq)]
#[serde(transparent)]
pub struct AccountConstructorParamsLotusJson {
#[schemars(with = "LotusJson<Address>")]
#[serde(with = "crate::lotus_json")]
pub address: Address,
}

#[derive(Serialize, Deserialize, JsonSchema, Debug, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct AuthenticateParamsLotusJson {
Expand Down Expand Up @@ -59,6 +69,39 @@ macro_rules! impl_account_authenticate_params {
};
}

// not added other versions because AuthenticateMessageParams is private for the rest of them
impl_account_authenticate_params!(types::AuthenticateMessageParams: 15, 16);
impl_account_authenticate_params!(AuthenticateMessageParams: 11, 12, 13, 14);
macro_rules! impl_account_constructor_params {
($type_suffix:path: $($version:literal),+) => {
$(
paste! {
impl HasLotusJson for fil_actor_account_state::[<v $version>]::$type_suffix {
type LotusJson = AccountConstructorParamsLotusJson;

#[cfg(test)]
fn snapshots() -> Vec<(serde_json::Value, Self)> {
vec![
(
json!("f01234"),
Self {
address: Address::new_id(1234).into(),
},
),
]
}

fn into_lotus_json(self) -> Self::LotusJson {
AccountConstructorParamsLotusJson { address: self.address.into() }
}

fn from_lotus_json(lotus_json: Self::LotusJson) -> Self {
Self { address: lotus_json.address.into() }
}
}
}
)+
};
}

impl_account_constructor_params!(types::ConstructorParams: 15, 16, 17);
impl_account_constructor_params!(ConstructorParams: 11, 12, 13, 14);
impl_account_authenticate_params!(types::AuthenticateMessageParams: 15, 16, 17);
impl_account_authenticate_params!(AuthenticateMessageParams: 9, 10, 11, 12, 13, 14);
Loading
Loading