Skip to content

Commit

Permalink
feat(grandpa): expose migrate entry point (#499)
Browse files Browse the repository at this point in the history
* feat(grandpa): expose migrate entry point

* chore: remote ununsed instantiate interface file
  • Loading branch information
duvbell authored May 21, 2024
1 parent 212fe90 commit 9d40863
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions light-clients/ics10-grandpa-cw/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use crate::{
msg::{
CheckForMisbehaviourMsg, CheckSubstituteAndUpdateStateMsg, ContractResult, ExecuteMsg,
ExportMetadataMsg, InstantiateMsg, QueryMsg, QueryResponse, StatusMsg, UpdateStateMsg,
UpdateStateOnMisbehaviourMsg, VerifyClientMessage, VerifyMembershipMsg,
VerifyNonMembershipMsg, VerifyUpgradeAndUpdateStateMsg,
UpdateStateOnMisbehaviourMsg, VerifyClientMessage, VerifyMembershipMsg, MigrateMsg,
VerifyNonMembershipMsg, VerifyUpgradeAndUpdateStateMsg
},
state::{get_client_state, get_consensus_state},
Bytes,
Expand Down Expand Up @@ -113,6 +113,12 @@ impl grandpa_light_client_primitives::HostFunctions for HostFunctions {
}
}

#[entry_point]
pub fn migrate(_deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> {
// No state migrations performed, just returned a Response
Ok(Response::default())
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn instantiate(
_deps: DepsMut,
Expand Down
3 changes: 3 additions & 0 deletions light-clients/ics10-grandpa-cw/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ pub struct ClientStateCallResponse {
pub result: ContractResult,
}

#[cw_serde]
pub struct MigrateMsg {}

#[cw_serde]
pub struct InstantiateMsg {}

Expand Down

0 comments on commit 9d40863

Please sign in to comment.