From e514fdb7f2a38f662228312ee9701ec5d41ac0ff Mon Sep 17 00:00:00 2001 From: Karel Moravec Date: Wed, 27 Nov 2024 21:08:25 +0100 Subject: [PATCH] feat: rebase fixes --- contracts/binding/src/lib.rs | 58 ++++++++++++++++--- contracts/test/integration/L2PlusSubnet.t.sol | 12 ++-- ipc/provider/src/manager/evm/manager.rs | 4 +- 3 files changed, 60 insertions(+), 14 deletions(-) diff --git a/contracts/binding/src/lib.rs b/contracts/binding/src/lib.rs index 23f3db46b..bbc78042b 100644 --- a/contracts/binding/src/lib.rs +++ b/contracts/binding/src/lib.rs @@ -2,24 +2,66 @@ #[macro_use] mod convert; #[allow(clippy::all)] -pub mod i_diamond; -#[allow(clippy::all)] -pub mod diamond_loupe_facet; +pub mod checkpointing_facet; #[allow(clippy::all)] pub mod diamond_cut_facet; #[allow(clippy::all)] -pub mod ownership_facet; +pub mod diamond_loupe_facet; #[allow(clippy::all)] pub mod gateway_diamond; #[allow(clippy::all)] +pub mod gateway_getter_facet; +#[allow(clippy::all)] pub mod gateway_manager_facet; #[allow(clippy::all)] -pub mod gateway_getter_facet; +pub mod gateway_messenger_facet; #[allow(clippy::all)] -pub mod checkpointing_facet; +pub mod i_diamond; +#[allow(clippy::all)] +pub mod lib_gateway; +#[allow(clippy::all)] +pub mod lib_quorum; +#[allow(clippy::all)] +pub mod lib_staking; +#[allow(clippy::all)] +pub mod lib_staking_change_log; +#[allow(clippy::all)] +pub mod ownership_facet; +#[allow(clippy::all)] +pub mod register_subnet_facet; +#[allow(clippy::all)] +pub mod subnet_actor_activity_facet; +#[allow(clippy::all)] +pub mod subnet_actor_checkpointing_facet; +#[allow(clippy::all)] +pub mod subnet_actor_diamond; +#[allow(clippy::all)] +pub mod subnet_actor_getter_facet; +#[allow(clippy::all)] +pub mod subnet_actor_manager_facet; +#[allow(clippy::all)] +pub mod subnet_actor_pause_facet; +#[allow(clippy::all)] +pub mod subnet_actor_reward_facet; +#[allow(clippy::all)] +pub mod subnet_getter_facet; +#[allow(clippy::all)] +pub mod subnet_registry_diamond; #[allow(clippy::all)] pub mod top_down_finality_facet; #[allow(clippy::all)] pub mod xnet_messaging_facet; -#[allow(clippy::all)] -pub mod gateway_messenger_facet; + +// The list of contracts need to convert FvmAddress to fvm_shared::Address +fvm_address_conversion!(gateway_manager_facet); +fvm_address_conversion!(gateway_getter_facet); +fvm_address_conversion!(xnet_messaging_facet); +fvm_address_conversion!(gateway_messenger_facet); +fvm_address_conversion!(subnet_actor_checkpointing_facet); +fvm_address_conversion!(subnet_actor_getter_facet); +fvm_address_conversion!(lib_gateway); +fvm_address_conversion!(checkpointing_facet); + +// The list of contracts that need to convert common types between each other +common_type_conversion!(subnet_actor_getter_facet, checkpointing_facet); +common_type_conversion!(subnet_actor_getter_facet, xnet_messaging_facet); diff --git a/contracts/test/integration/L2PlusSubnet.t.sol b/contracts/test/integration/L2PlusSubnet.t.sol index 43581c373..f3d4a2107 100644 --- a/contracts/test/integration/L2PlusSubnet.t.sol +++ b/contracts/test/integration/L2PlusSubnet.t.sol @@ -32,6 +32,8 @@ import {SubnetActorFacetsHelper} from "../helpers/SubnetActorFacetsHelper.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {ERC20PresetFixedSupply} from "../helpers/ERC20PresetFixedSupply.sol"; +import {ActivityHelper} from "../helpers/ActivityHelper.sol"; + import "forge-std/console.sol"; contract L2PlusSubnetTest is Test, IntegrationTestBase { @@ -705,11 +707,12 @@ contract L2PlusSubnetTest is Test, IntegrationTestBase { blockHeight: batch.blockHeight, blockHash: keccak256("block1"), nextConfigurationNumber: 0, - msgs: batch.msgs + msgs: batch.msgs, + activity: ActivityHelper.newCompressedActivityRollup(1, 3, bytes32(uint256(0))) }); vm.startPrank(FilAddress.SYSTEM_ACTOR); - checkpointer.createBottomUpCheckpoint(checkpoint, membershipRoot, weights[0] + weights[1] + weights[2]); + checkpointer.createBottomUpCheckpoint(checkpoint, membershipRoot, weights[0] + weights[1] + weights[2], ActivityHelper.dummyActivityRollup()); vm.stopPrank(); return checkpoint; @@ -733,11 +736,12 @@ contract L2PlusSubnetTest is Test, IntegrationTestBase { blockHeight: e, blockHash: keccak256("block1"), nextConfigurationNumber: 0, - msgs: msgs + msgs: msgs, + activity: ActivityHelper.newCompressedActivityRollup(1, 3, bytes32(uint256(0))) }); vm.startPrank(FilAddress.SYSTEM_ACTOR); - checkpointer.createBottomUpCheckpoint(checkpoint, membershipRoot, weights[0] + weights[1] + weights[2]); + checkpointer.createBottomUpCheckpoint(checkpoint, membershipRoot, weights[0] + weights[1] + weights[2], ActivityHelper.dummyActivityRollup()); vm.stopPrank(); return checkpoint; diff --git a/ipc/provider/src/manager/evm/manager.rs b/ipc/provider/src/manager/evm/manager.rs index 690775d2c..a43a9e745 100644 --- a/ipc/provider/src/manager/evm/manager.rs +++ b/ipc/provider/src/manager/evm/manager.rs @@ -8,8 +8,8 @@ use std::time::Duration; use ethers_contract::{ContractError, EthLogDecode, LogMeta}; use ipc_actors_abis::{ - checkpointing_facet, gateway_getter_facet, gateway_manager_facet, gateway_messenger_facet, - lib_gateway, lib_quorum, lib_staking_change_log, register_subnet_facet, + checkpointing_facet, gateway_getter_facet, gateway_manager_facet, lib_gateway, lib_quorum, + lib_staking_change_log, register_subnet_facet, subnet_actor_activity_facet, subnet_actor_checkpointing_facet, subnet_actor_getter_facet, subnet_actor_manager_facet, subnet_actor_reward_facet, };