Skip to content

Commit

Permalink
feat: rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
karlem committed Nov 27, 2024
1 parent e0586e4 commit e514fdb
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 14 deletions.
58 changes: 50 additions & 8 deletions contracts/binding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
12 changes: 8 additions & 4 deletions contracts/test/integration/L2PlusSubnet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions ipc/provider/src/manager/evm/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit e514fdb

Please sign in to comment.