Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
CHORE: Update ABI bindings after BottomUpCheckpointNew to BottomUpChe…
Browse files Browse the repository at this point in the history
…ckpoint rename (#291)
  • Loading branch information
aakoshh authored Sep 29, 2023
1 parent 26510f2 commit ee00e29
Show file tree
Hide file tree
Showing 9 changed files with 792 additions and 727 deletions.
168 changes: 84 additions & 84 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fendermint/vm/actor_interface/src/ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use ethers::core::types as et;
use fendermint_vm_genesis::Validator;
use fendermint_vm_ipc_actors as ia;
pub use fendermint_vm_ipc_actors::gateway_manager_facet::SubnetID;
pub use fendermint_vm_ipc_actors::gateway_router_facet::BottomUpCheckpointNew as BottomUpCheckpoint;
pub use fendermint_vm_ipc_actors::gateway_router_facet::BottomUpCheckpoint;
use lazy_static::lazy_static;
use merkle_tree_rs::{
core::{process_proof, Hash},
Expand Down
6 changes: 3 additions & 3 deletions fendermint/vm/interpreter/src/fvm/state/ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use fendermint_vm_actor_interface::{
};
use fendermint_vm_genesis::Validator;
use fendermint_vm_ipc_actors::gateway_getter_facet::{GatewayGetterFacet, SubnetID};
use fendermint_vm_ipc_actors::gateway_router_facet::{BottomUpCheckpointNew, GatewayRouterFacet};
use fendermint_vm_ipc_actors::gateway_router_facet::{BottomUpCheckpoint, GatewayRouterFacet};
use fendermint_vm_message::signed::sign_secp256k1;

use super::{
Expand Down Expand Up @@ -79,7 +79,7 @@ impl<DB: Blockstore> GatewayCaller<DB> {
pub fn create_bottom_up_checkpoint(
&self,
state: &mut FvmExecState<DB>,
checkpoint: BottomUpCheckpointNew,
checkpoint: BottomUpCheckpoint,
power_table: &[Validator],
) -> anyhow::Result<()> {
// Construct a Merkle tree from the power table, which we can use to validate validator set membership
Expand All @@ -101,7 +101,7 @@ impl<DB: Blockstore> GatewayCaller<DB> {
/// This will need to be broadcasted as a transaction.
pub fn add_checkpoint_signature_calldata(
&self,
checkpoint: BottomUpCheckpointNew,
checkpoint: BottomUpCheckpoint,
power_table: &[Validator],
validator: &Validator,
secret_key: &SecretKey,
Expand Down
2 changes: 1 addition & 1 deletion fendermint/vm/ipc_actors/src/gateway_diamond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ pub mod gateway_diamond {
__abi,
);
#[rustfmt::skip]
const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R6\x15`\x87W`\0\x805`\x01`\x01`\xE0\x1B\x03\x19\x16\x80\x82R\x7F\x80n\x0C\xBB\x9F\xCE)k\xBC3jH\xF4+\xF1\xDB\xC6\x97\"\xD1\x8D\x90\xD6\xFEp[u\x82\xC2\xBBK\xD2` R`@\x82 T`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15`oWP\x81\x80\x916\x82\x807\x816\x91Z\xF4=\x82\x80>\x15`kW=\x90\xF3[=\x90\xFD[`$\x90`@Q\x90c\n\x82\xDDs`\xE3\x1B\x82R`\x04\x82\x01R\xFD[`\0\x805`\x01`\x01`\xE0\x1B\x03\x19\x16\x80\x82R\x7F\x80n\x0C\xBB\x9F\xCE)k\xBC3jH\xF4+\xF1\xDB\xC6\x97\"\xD1\x8D\x90\xD6\xFEp[u\x82\xC2\xBBK\xD2` R`@\x82 T`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15`\xE9WP\x81\x80\x916\x82\x807\x816\x91Z\xF4=\x82\x80>\x15`kW=\x90\xF3[c\n\x82\xDDs`\xE3\x1B`\x80R`\x84R`$`\x80\xFD\xFE\xA2dipfsX\"\x12 \xDER\x10\n\x0F\x1FT\xD7\xC9*\xBC\xB9{\xDF0\x85u\xBB\x8D\x1D\xBB\n\xD6\x9B\x1E\x8Cq\xA3\xD5\x85MJdsolcC\0\x08\x13\x003";
const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R6\x15`\x87W`\0\x805`\x01`\x01`\xE0\x1B\x03\x19\x16\x80\x82R\x7F\x80n\x0C\xBB\x9F\xCE)k\xBC3jH\xF4+\xF1\xDB\xC6\x97\"\xD1\x8D\x90\xD6\xFEp[u\x82\xC2\xBBK\xD2` R`@\x82 T`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15`oWP\x81\x80\x916\x82\x807\x816\x91Z\xF4=\x82\x80>\x15`kW=\x90\xF3[=\x90\xFD[`$\x90`@Q\x90c\n\x82\xDDs`\xE3\x1B\x82R`\x04\x82\x01R\xFD[`\0\x805`\x01`\x01`\xE0\x1B\x03\x19\x16\x80\x82R\x7F\x80n\x0C\xBB\x9F\xCE)k\xBC3jH\xF4+\xF1\xDB\xC6\x97\"\xD1\x8D\x90\xD6\xFEp[u\x82\xC2\xBBK\xD2` R`@\x82 T`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15`\xE9WP\x81\x80\x916\x82\x807\x816\x91Z\xF4=\x82\x80>\x15`kW=\x90\xF3[c\n\x82\xDDs`\xE3\x1B`\x80R`\x84R`$`\x80\xFD\xFE\xA2dipfsX\"\x12 Z_R\x11\x99=Ie\xF8L*\xA4\xF5\xDCR\xD4MR\x1E\x10\xA4\xF7\xB7\x91\xB3\x02\xD4\x8C(E\xCB\xAFdsolcC\0\x08\x13\x003";
/// The deployed bytecode of the contract.
pub static GATEWAYDIAMOND_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static(
__DEPLOYED_BYTECODE,
Expand Down
585 changes: 499 additions & 86 deletions fendermint/vm/ipc_actors/src/gateway_getter_facet.rs

Large diffs are not rendered by default.

721 changes: 184 additions & 537 deletions fendermint/vm/ipc_actors/src/gateway_router_facet.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fendermint/vm/ipc_actors/src/subnet_actor_diamond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ pub mod subnet_actor_diamond {
::ethers::core::abi::Abi,
> = ::ethers::contract::Lazy::new(__abi);
#[rustfmt::skip]
const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R6\x15`\x91W`\0\x805`\x01`\x01`\xE0\x1B\x03\x19\x16\x80\x82R\x7F\x80n\x0C\xBB\x9F\xCE)k\xBC3jH\xF4+\xF1\xDB\xC6\x97\"\xD1\x8D\x90\xD6\xFEp[u\x82\xC2\xBBK\xD2` R`@\x82 T`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15`oWP\x81\x80\x916\x82\x807\x816\x91Z\xF4=\x82\x80>\x15`kW=\x90\xF3[=\x90\xFD[c\n\x82\xDDs`\xE3\x1B`\x80R`\x01`\x01`\xE0\x1B\x03\x19\x16`\x84R`\x7F\x19`\xA4\x01`\x80\xFD[`\rT`\x01`\x01`\xA0\x1B\x03\x163\x03`\xA4W\0[c\xE7\xE6\x01\xDB`\xE0\x1B`\x80R`\x04`\x80\xFD\xFE\xA2dipfsX\"\x12 \xCE\xA6tO\xC9A'\xDA\xC6mx\xF8O\xEA\xD5\x10\xEA\xF5,\xAC(!Z\x9E@\xFE\x0E0\x81lx\tdsolcC\0\x08\x13\x003";
const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R6\x15`\x91W`\0\x805`\x01`\x01`\xE0\x1B\x03\x19\x16\x80\x82R\x7F\x80n\x0C\xBB\x9F\xCE)k\xBC3jH\xF4+\xF1\xDB\xC6\x97\"\xD1\x8D\x90\xD6\xFEp[u\x82\xC2\xBBK\xD2` R`@\x82 T`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15`oWP\x81\x80\x916\x82\x807\x816\x91Z\xF4=\x82\x80>\x15`kW=\x90\xF3[=\x90\xFD[c\n\x82\xDDs`\xE3\x1B`\x80R`\x01`\x01`\xE0\x1B\x03\x19\x16`\x84R`\x7F\x19`\xA4\x01`\x80\xFD[`\rT`\x01`\x01`\xA0\x1B\x03\x163\x03`\xA4W\0[c\xE7\xE6\x01\xDB`\xE0\x1B`\x80R`\x04`\x80\xFD\xFE\xA2dipfsX\"\x12 )\xD3\xFE\n\xBA\xCFA\xA0\xB0\xEFw~\xB8\xB3\xFD\xA4\xEFK\x1C\xC6\xCBu\x8B\x12V.M\x7F \xF4\xC6\xBBdsolcC\0\x08\x13\x003";
/// The deployed bytecode of the contract.
pub static SUBNETACTORDIAMOND_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes = ::ethers::core::types::Bytes::from_static(
__DEPLOYED_BYTECODE,
Expand Down
21 changes: 13 additions & 8 deletions fendermint/vm/ipc_actors/src/subnet_actor_getter_facet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ pub mod subnet_actor_getter_facet {
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned(
"struct BottomUpCheckpoint",
"struct BottomUpCheckpointLegacy",
),
),
},
Expand Down Expand Up @@ -660,7 +660,7 @@ pub mod subnet_actor_getter_facet {
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned(
"struct BottomUpCheckpoint[]",
"struct BottomUpCheckpointLegacy[]",
),
),
},
Expand Down Expand Up @@ -1058,7 +1058,10 @@ pub mod subnet_actor_getter_facet {
pub fn bottom_up_checkpoint_at_epoch(
&self,
epoch: u64,
) -> ::ethers::contract::builders::ContractCall<M, (bool, BottomUpCheckpoint)> {
) -> ::ethers::contract::builders::ContractCall<
M,
(bool, BottomUpCheckpointLegacy),
> {
self.0
.method_hash([108, 178, 236, 238], epoch)
.expect("method not found (this should never happen)")
Expand Down Expand Up @@ -1174,7 +1177,7 @@ pub mod subnet_actor_getter_facet {
to_epoch: u64,
) -> ::ethers::contract::builders::ContractCall<
M,
::std::vec::Vec<BottomUpCheckpoint>,
::std::vec::Vec<BottomUpCheckpointLegacy>,
> {
self.0
.method_hash([172, 156, 42, 111], (from_epoch, to_epoch))
Expand Down Expand Up @@ -2197,7 +2200,7 @@ pub mod subnet_actor_getter_facet {
)]
pub struct BottomUpCheckpointAtEpochReturn {
pub exists: bool,
pub checkpoint: BottomUpCheckpoint,
pub checkpoint: BottomUpCheckpointLegacy,
}
///Container type for all return fields from the `bottomUpCheckpointHashAtEpoch` function with signature `bottomUpCheckpointHashAtEpoch(uint64)` and selector `0x133f74ea`
#[derive(
Expand Down Expand Up @@ -2345,7 +2348,9 @@ pub mod subnet_actor_getter_facet {
Eq,
Hash
)]
pub struct ListBottomUpCheckpointsReturn(pub ::std::vec::Vec<BottomUpCheckpoint>);
pub struct ListBottomUpCheckpointsReturn(
pub ::std::vec::Vec<BottomUpCheckpointLegacy>,
);
///Container type for all return fields from the `majorityPercentage` function with signature `majorityPercentage()` and selector `0x599c7bd1`
#[derive(
Clone,
Expand Down Expand Up @@ -2502,7 +2507,7 @@ pub mod subnet_actor_getter_facet {
Hash
)]
pub struct ValidatorWorkerAddrReturn(pub FvmAddress);
///`BottomUpCheckpoint((uint64,address[]),uint64,uint256,((((uint64,address[]),(uint8,bytes)),((uint64,address[]),(uint8,bytes)),uint256,uint64,bytes4,bytes),bool)[],((uint64,address[]),bytes32[])[],bytes32,bytes)`
///`BottomUpCheckpointLegacy((uint64,address[]),uint64,uint256,((((uint64,address[]),(uint8,bytes)),((uint64,address[]),(uint8,bytes)),uint256,uint64,bytes4,bytes),bool)[],((uint64,address[]),bytes32[])[],bytes32,bytes)`
#[derive(
Clone,
::ethers::contract::EthAbiType,
Expand All @@ -2513,7 +2518,7 @@ pub mod subnet_actor_getter_facet {
Eq,
Hash
)]
pub struct BottomUpCheckpoint {
pub struct BottomUpCheckpointLegacy {
pub source: SubnetID,
pub epoch: u64,
pub fee: ::ethers::core::types::U256,
Expand Down
12 changes: 6 additions & 6 deletions fendermint/vm/ipc_actors/src/subnet_actor_manager_facet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ pub mod subnet_actor_manager_facet {
),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned(
"struct BottomUpCheckpoint",
"struct BottomUpCheckpointLegacy",
),
),
},
Expand Down Expand Up @@ -798,7 +798,7 @@ pub mod subnet_actor_manager_facet {
///Calls the contract's `submitCheckpoint` (0xf6fd8381) function
pub fn submit_checkpoint(
&self,
checkpoint: BottomUpCheckpoint,
checkpoint: BottomUpCheckpointLegacy,
) -> ::ethers::contract::builders::ContractCall<M, ()> {
self.0
.method_hash([246, 253, 131, 129], (checkpoint,))
Expand Down Expand Up @@ -1474,7 +1474,7 @@ pub mod subnet_actor_manager_facet {
abi = "BottomUpCheckpointSubmitted(((uint64,address[]),uint64,uint256,((((uint64,address[]),(uint8,bytes)),((uint64,address[]),(uint8,bytes)),uint256,uint64,bytes4,bytes),bool)[],((uint64,address[]),bytes32[])[],bytes32,bytes),address)"
)]
pub struct BottomUpCheckpointSubmittedFilter {
pub checkpoint: BottomUpCheckpoint,
pub checkpoint: BottomUpCheckpointLegacy,
pub submitter: ::ethers::core::types::Address,
}
#[derive(
Expand Down Expand Up @@ -1684,7 +1684,7 @@ pub mod subnet_actor_manager_facet {
abi = "submitCheckpoint(((uint64,address[]),uint64,uint256,((((uint64,address[]),(uint8,bytes)),((uint64,address[]),(uint8,bytes)),uint256,uint64,bytes4,bytes),bool)[],((uint64,address[]),bytes32[])[],bytes32,bytes))"
)]
pub struct SubmitCheckpointCall {
pub checkpoint: BottomUpCheckpoint,
pub checkpoint: BottomUpCheckpointLegacy,
}
///Container type for all input parameters for the `withdraw` function with signature `withdraw()` and selector `0x3ccfd60b`
#[derive(
Expand Down Expand Up @@ -1877,7 +1877,7 @@ pub mod subnet_actor_manager_facet {
pub prev_hash: [u8; 32],
pub proof: ::ethers::core::types::Bytes,
}
///`BottomUpCheckpoint((uint64,address[]),uint64,uint256,((((uint64,address[]),(uint8,bytes)),((uint64,address[]),(uint8,bytes)),uint256,uint64,bytes4,bytes),bool)[],((uint64,address[]),bytes32[])[],bytes32,bytes)`
///`BottomUpCheckpointLegacy((uint64,address[]),uint64,uint256,((((uint64,address[]),(uint8,bytes)),((uint64,address[]),(uint8,bytes)),uint256,uint64,bytes4,bytes),bool)[],((uint64,address[]),bytes32[])[],bytes32,bytes)`
#[derive(
Clone,
::ethers::contract::EthAbiType,
Expand All @@ -1888,7 +1888,7 @@ pub mod subnet_actor_manager_facet {
Eq,
Hash
)]
pub struct BottomUpCheckpoint {
pub struct BottomUpCheckpointLegacy {
pub source: SubnetID,
pub epoch: u64,
pub fee: ::ethers::core::types::U256,
Expand Down

0 comments on commit ee00e29

Please sign in to comment.