Skip to content

Commit

Permalink
Fixed tests
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 3c44775 commit d9c5ea0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
6 changes: 1 addition & 5 deletions chain-factory/tests/chain_factory_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const CONFIG_CODE_PATH: MxscPath = MxscPath::new("../chain-config/output/chain-f

const OWNER: TestAddress = TestAddress::new("owner");
const OWNER_BALANCE: u64 = 100_000_000_000;
const DEPLOY_COST: u64 = 10_000_000_000;

fn world() -> ScenarioWorld {
let mut blockchain = ScenarioWorld::new();
Expand Down Expand Up @@ -80,7 +79,6 @@ impl ChainFactoryTestState {

fn propose_deploy_chain_config_from_factory(
&mut self,
payment: BigUint<StaticApi>,
min_validators: usize,
max_validators: usize,
min_stake: BigUint<StaticApi>,
Expand All @@ -98,8 +96,7 @@ impl ChainFactoryTestState {
max_validators,
min_stake,
additional_stake_required,
)
.egld(payment);
);

match expected_result {
Some(error) => {
Expand Down Expand Up @@ -139,7 +136,6 @@ fn deploy_chain_config_from_factory() {
println!("{}", current_dir().unwrap().to_str().unwrap());

state.propose_deploy_chain_config_from_factory(
DEPLOY_COST.into(),
min_validators,
max_validators,
min_stake,
Expand Down
15 changes: 8 additions & 7 deletions common/proxies/src/chain_factory_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ where
max_validators: Arg1,
min_stake: Arg2,
additional_stake_required: Arg3,
) -> TxTypedCall<Env, From, To, (), Gas, ManagedAddress<Env::Api>> {
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ManagedAddress<Env::Api>> {
self.wrapped_tx
.payment(NotPayable)
.raw_call("deploySovereignChainConfigContract")
.argument(&min_validators)
.argument(&max_validators)
Expand All @@ -131,22 +132,22 @@ where
pub fn deploy_enshrine_esdt_safe<
Arg0: ProxyArg<bool>,
Arg1: ProxyArg<ManagedAddress<Env::Api>>,
Arg2: ProxyArg<Option<TokenIdentifier<Env::Api>>>,
Arg3: ProxyArg<Option<ManagedBuffer<Env::Api>>>,
Arg2: ProxyArg<TokenIdentifier<Env::Api>>,
Arg3: ProxyArg<ManagedBuffer<Env::Api>>,
>(
self,
is_sovereign_chain: Arg0,
token_handler_address: Arg1,
opt_wegld_identifier: Arg2,
opt_sov_token_prefix: Arg3,
wegld_identifier: Arg2,
sov_token_prefix: Arg3,
) -> TxTypedCall<Env, From, To, NotPayable, Gas, ManagedAddress<Env::Api>> {
self.wrapped_tx
.payment(NotPayable)
.raw_call("deployEnshrineEsdtSafe")
.argument(&is_sovereign_chain)
.argument(&token_handler_address)
.argument(&opt_wegld_identifier)
.argument(&opt_sov_token_prefix)
.argument(&wegld_identifier)
.argument(&sov_token_prefix)
.original_result()
}

Expand Down

0 comments on commit d9c5ea0

Please sign in to comment.