Skip to content

Commit

Permalink
Added empty endpoint for completing setup_phase
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Baltariu <[email protected]>
  • Loading branch information
andreiblt1304 committed Nov 13, 2024
1 parent 06c94cb commit 4e74dcc
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
6 changes: 6 additions & 0 deletions chain-factory/src/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ pub trait FactoryModule: only_admin::OnlyAdminModule {
.sync_call()
}

#[only_owner]
#[endpoint(completeSetupPhase)]
fn complete_setup_phase(&self, _contract_address: ManagedAddress) {
// TODO: will have to call each contract's endpoint to finish setup phase
}

#[storage_mapper("chainConfigTemplate")]
fn chain_config_template(&self) -> SingleValueMapper<ManagedAddress>;

Expand Down
5 changes: 3 additions & 2 deletions chain-factory/wasm-chain-factory-full/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

// Init: 1
// Upgrade: 1
// Endpoints: 11
// Endpoints: 12
// Async Callback (empty): 1
// Total number of exported functions: 14
// Total number of exported functions: 15

#![no_std]

Expand All @@ -24,6 +24,7 @@ multiversx_sc_wasm_adapter::endpoints! {
deployHeaderVerifier => deploy_header_verifier
deployEnshrineEsdtSafe => deploy_enshrine_esdt_safe
deployFeeMarket => deploy_fee_market
completeSetupPhase => complete_setup_phase
setMinValidSigners => set_min_valid_signers
addSigners => add_signers
removeSigners => remove_signers
Expand Down
5 changes: 3 additions & 2 deletions chain-factory/wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

// Init: 1
// Upgrade: 1
// Endpoints: 11
// Endpoints: 12
// Async Callback (empty): 1
// Total number of exported functions: 14
// Total number of exported functions: 15

#![no_std]

Expand All @@ -24,6 +24,7 @@ multiversx_sc_wasm_adapter::endpoints! {
deployHeaderVerifier => deploy_header_verifier
deployEnshrineEsdtSafe => deploy_enshrine_esdt_safe
deployFeeMarket => deploy_fee_market
completeSetupPhase => complete_setup_phase
setMinValidSigners => set_min_valid_signers
addSigners => add_signers
removeSigners => remove_signers
Expand Down
13 changes: 13 additions & 0 deletions common/proxies/src/chain_factory_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,19 @@ where
.original_result()
}

pub fn complete_setup_phase<
Arg0: ProxyArg<ManagedAddress<Env::Api>>,
>(
self,
_contract_address: Arg0,
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> {
self.wrapped_tx
.payment(NotPayable)
.raw_call("completeSetupPhase")
.argument(&_contract_address)
.original_result()
}

pub fn set_min_valid_signers<
Arg0: ProxyArg<u32>,
>(
Expand Down

0 comments on commit 4e74dcc

Please sign in to comment.