From 8b911478d9ec9b95066c9a6352285cf2ce2d201f Mon Sep 17 00:00:00 2001 From: Mihai Calin Luca Date: Fri, 26 Jan 2024 12:12:02 +0100 Subject: [PATCH 1/5] start impl get code metadata for vm rust --- framework/base/src/api/blockchain_api.rs | 4 +++- .../src/api/uncallable/blockchain_api_uncallable.rs | 4 ++++ .../src/contract_base/wrappers/blockchain_wrapper.rs | 9 ++++++--- .../scenario/src/api/core_api_vh/blockchain_api_vh.rs | 8 ++++++++ framework/wasm-adapter/src/api/blockchain_api_node.rs | 11 +++++++++++ vm/src/vm_hooks/vh_dispatcher.rs | 4 ++-- vm/src/vm_hooks/vh_handler/vh_blockchain.rs | 11 ++++++++++- 7 files changed, 44 insertions(+), 7 deletions(-) diff --git a/framework/base/src/api/blockchain_api.rs b/framework/base/src/api/blockchain_api.rs index a879c8cdce..2d156456c1 100644 --- a/framework/base/src/api/blockchain_api.rs +++ b/framework/base/src/api/blockchain_api.rs @@ -1,7 +1,7 @@ use super::{HandleTypeInfo, ManagedTypeApi, ManagedTypeApiImpl, RawHandle}; use crate::types::{ heap::{Address, Box, H256}, - EsdtLocalRoleFlags, + CodeMetadata, EsdtLocalRoleFlags, }; pub trait BlockchainApi: ManagedTypeApi { @@ -61,6 +61,8 @@ pub trait BlockchainApiImpl: ManagedTypeApiImpl { self.load_balance_legacy(dest, &address); } + fn get_code_metadata(&self, address_handle: Self::ManagedBufferHandle) -> CodeMetadata; + fn load_state_root_hash_managed(&self, dest: Self::ManagedBufferHandle); fn get_tx_hash_legacy(&self) -> H256; diff --git a/framework/base/src/api/uncallable/blockchain_api_uncallable.rs b/framework/base/src/api/uncallable/blockchain_api_uncallable.rs index 03d7d61aa5..8820a973d7 100644 --- a/framework/base/src/api/uncallable/blockchain_api_uncallable.rs +++ b/framework/base/src/api/uncallable/blockchain_api_uncallable.rs @@ -157,4 +157,8 @@ impl BlockchainApiImpl for UncallableApi { ) -> crate::types::EsdtLocalRoleFlags { unreachable!() } + + fn get_code_metadata(&self, _address_handle: Self::ManagedBufferHandle) -> crate::types::CodeMetadata { + unreachable!() + } } diff --git a/framework/base/src/contract_base/wrappers/blockchain_wrapper.rs b/framework/base/src/contract_base/wrappers/blockchain_wrapper.rs index f39f803b06..cba1027808 100644 --- a/framework/base/src/contract_base/wrappers/blockchain_wrapper.rs +++ b/framework/base/src/contract_base/wrappers/blockchain_wrapper.rs @@ -10,9 +10,7 @@ use crate::{ err_msg::{ONLY_OWNER_CALLER, ONLY_USER_ACCOUNT_CALLER}, storage::{self}, types::{ - BackTransfers, BigUint, EgldOrEsdtTokenIdentifier, EsdtLocalRoleFlags, EsdtTokenData, - EsdtTokenType, ManagedAddress, ManagedBuffer, ManagedByteArray, ManagedType, ManagedVec, - TokenIdentifier, + BackTransfers, BigUint, CodeMetadata, EgldOrEsdtTokenIdentifier, EsdtLocalRoleFlags, EsdtTokenData, EsdtTokenType, ManagedAddress, ManagedBuffer, ManagedByteArray, ManagedType, ManagedVec, TokenIdentifier }, }; @@ -135,6 +133,11 @@ where BigUint::from_handle(handle) } + #[inline] + pub fn get_code_metadata(&self, address: &ManagedAddress) -> CodeMetadata { + A::blockchain_api_impl().get_code_metadata(address.get_handle()) + } + #[inline] pub fn get_sc_balance(&self, token: &EgldOrEsdtTokenIdentifier, nonce: u64) -> BigUint { token.map_ref_or_else( diff --git a/framework/scenario/src/api/core_api_vh/blockchain_api_vh.rs b/framework/scenario/src/api/core_api_vh/blockchain_api_vh.rs index 03c3861bf5..4b7fb7f334 100644 --- a/framework/scenario/src/api/core_api_vh/blockchain_api_vh.rs +++ b/framework/scenario/src/api/core_api_vh/blockchain_api_vh.rs @@ -267,4 +267,12 @@ impl BlockchainApiImpl for VMHooksApi { multiversx_sc::types::EsdtLocalRoleFlags::from_bits_retain(result as u64) } + + fn get_code_metadata( + &self, + address_handle: Self::ManagedBufferHandle, + ) -> multiversx_sc::types::CodeMetadata { + let result = + self.with_vm_hooks(|vh| vh.managed_get_code_metadata(address_handle.get_raw_handle())); + } } diff --git a/framework/wasm-adapter/src/api/blockchain_api_node.rs b/framework/wasm-adapter/src/api/blockchain_api_node.rs index e5a5d55f79..1a62beecbc 100644 --- a/framework/wasm-adapter/src/api/blockchain_api_node.rs +++ b/framework/wasm-adapter/src/api/blockchain_api_node.rs @@ -83,6 +83,8 @@ extern "C" { fn managedIsESDTLimitedTransfer(tokenIDHandle: i32) -> i32; fn getESDTLocalRoles(tokenhandle: i32) -> i64; + + fn managedGetCodeMetadata(address_handle: i32) -> u16; } impl BlockchainApi for VmApiImpl { @@ -360,4 +362,13 @@ impl BlockchainApiImpl for VmApiImpl { getESDTLocalRoles(token_id_handle) } as u64) } + + fn get_code_metadata( + &self, + address_handle: Self::ManagedBufferHandle, + ) -> multiversx_sc::types::CodeMetadata { + multiversx_sc::types::CodeMetadata::from_bits_retain(unsafe { + managedGetCodeMetadata(address_handle) + }) + } } diff --git a/vm/src/vm_hooks/vh_dispatcher.rs b/vm/src/vm_hooks/vh_dispatcher.rs index 539e1170ca..d0e8bde6de 100644 --- a/vm/src/vm_hooks/vh_dispatcher.rs +++ b/vm/src/vm_hooks/vh_dispatcher.rs @@ -938,8 +938,8 @@ impl VMHooks for VMHooksDispatcher { self.handler.mb_to_hex(source_handle, dest_handle); } - fn managed_get_code_metadata(&self, address_handle: i32, response_handle: i32) { - panic!("Unavailable: managed_get_code_metadata") + fn managed_get_code_metadata(&self, address_handle: i32) -> crate::types::VMCodeMetadata { + self.handler.get_code_metadata(address_handle) } fn managed_is_builtin_function(&self, function_name_handle: i32) -> i32 { diff --git a/vm/src/vm_hooks/vh_handler/vh_blockchain.rs b/vm/src/vm_hooks/vh_handler/vh_blockchain.rs index f6f722d6e8..96e8f28961 100644 --- a/vm/src/vm_hooks/vh_handler/vh_blockchain.rs +++ b/vm/src/vm_hooks/vh_handler/vh_blockchain.rs @@ -1,5 +1,5 @@ use crate::{ - types::{EsdtLocalRole, EsdtLocalRoleFlags, RawHandle, VMAddress}, + types::{EsdtLocalRole, EsdtLocalRoleFlags, RawHandle, VMAddress, VMCodeMetadata}, vm_hooks::VMHooksHandlerSource, world_mock::{EsdtData, EsdtInstance}, }; @@ -138,6 +138,15 @@ pub trait VMHooksBlockchain: VMHooksHandlerSource { self.m_types_lock().bi_overwrite(dest, esdt_balance.into()); } + fn get_code_metadata( + &self, + address_handle: RawHandle, + ) -> VMCodeMetadata { + let address = VMAddress::from_slice(self.m_types_lock().mb_get(address_handle)); + let data = self.account_data(&address).unwrap(); + data.code_metadata + } + #[allow(clippy::too_many_arguments)] fn managed_get_esdt_token_data( &self, From 38f37eb17f2739bdd0cc997cee54d205d58efd80 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Fri, 26 Jan 2024 14:10:14 +0200 Subject: [PATCH 2/5] get code metadata api & hook --- .../scenarios/get_code_metadata.scen.json | 61 +++++++++++++++++++ .../src/blockchain_api_features.rs | 5 ++ .../tests/basic_features_scenario_go_test.rs | 10 +++ .../tests/basic_features_scenario_rs_test.rs | 10 +++ .../basic-features/wasm/src/lib.rs | 5 +- framework/base/src/api/blockchain_api.rs | 10 ++- .../uncallable/blockchain_api_uncallable.rs | 6 +- .../wrappers/blockchain_wrapper.rs | 11 +++- .../src/api/core_api_vh/blockchain_api_vh.rs | 13 ++-- .../src/api/blockchain_api_node.rs | 13 ++-- vm/src/vm_hooks/vh_dispatcher.rs | 5 +- vm/src/vm_hooks/vh_handler/vh_blockchain.rs | 18 +++--- 12 files changed, 140 insertions(+), 27 deletions(-) create mode 100644 contracts/feature-tests/basic-features/scenarios/get_code_metadata.scen.json diff --git a/contracts/feature-tests/basic-features/scenarios/get_code_metadata.scen.json b/contracts/feature-tests/basic-features/scenarios/get_code_metadata.scen.json new file mode 100644 index 0000000000..832caa8950 --- /dev/null +++ b/contracts/feature-tests/basic-features/scenarios/get_code_metadata.scen.json @@ -0,0 +1,61 @@ +{ + "steps": [ + { + "step": "setState", + "accounts": { + "sc:basic-features": { + "nonce": "0", + "balance": "0", + "code": "mxsc:../output/basic-features.mxsc.json", + "codeMetadata": "0x0104" + }, + "address:an_account": { + "nonce": "0", + "balance": "0" + } + } + }, + { + "step": "scCall", + "id": "get_code_metadata", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "get_code_metadata", + "arguments": [ + "sc:basic-features" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "0x0104" + ], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "get_code_metadata-missing-address", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "get_code_metadata", + "arguments": [ + "sc:missing" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "10", + "message": "str:account not found: 000000000000000000006d697373696e675f5f5f5f5f5f5f5f5f5f5f5f5f5f5f" + } + } + ] +} diff --git a/contracts/feature-tests/basic-features/src/blockchain_api_features.rs b/contracts/feature-tests/basic-features/src/blockchain_api_features.rs index 73538d8aca..60a8b39257 100644 --- a/contracts/feature-tests/basic-features/src/blockchain_api_features.rs +++ b/contracts/feature-tests/basic-features/src/blockchain_api_features.rs @@ -42,4 +42,9 @@ pub trait BlockchainApiFeatures { fn get_cumulated_validator_rewards(&self) -> BigUint { self.blockchain().get_cumulated_validator_rewards() } + + #[endpoint] + fn get_code_metadata(&self, address: ManagedAddress) -> CodeMetadata { + self.blockchain().get_code_metadata(&address) + } } diff --git a/contracts/feature-tests/basic-features/tests/basic_features_scenario_go_test.rs b/contracts/feature-tests/basic-features/tests/basic_features_scenario_go_test.rs index ab96b331d6..2256c160ae 100644 --- a/contracts/feature-tests/basic-features/tests/basic_features_scenario_go_test.rs +++ b/contracts/feature-tests/basic-features/tests/basic_features_scenario_go_test.rs @@ -199,6 +199,11 @@ fn get_caller_go() { world().run("scenarios/get_caller.scen.json"); } +#[test] +fn get_code_metadata_go() { + world().run("scenarios/get_code_metadata.scen.json"); +} + #[test] fn get_cumulated_validator_rewards_go() { world().run("scenarios/get_cumulated_validator_rewards.scen.json"); @@ -356,6 +361,11 @@ fn storage_mapper_fungible_token_go() { world().run("scenarios/storage_mapper_fungible_token.scen.json"); } +#[test] +fn storage_mapper_get_at_address_go() { + world().run("scenarios/storage_mapper_get_at_address.scen.json"); +} + #[test] fn storage_mapper_linked_list_go() { world().run("scenarios/storage_mapper_linked_list.scen.json"); diff --git a/contracts/feature-tests/basic-features/tests/basic_features_scenario_rs_test.rs b/contracts/feature-tests/basic-features/tests/basic_features_scenario_rs_test.rs index 69532177c9..47a916f629 100644 --- a/contracts/feature-tests/basic-features/tests/basic_features_scenario_rs_test.rs +++ b/contracts/feature-tests/basic-features/tests/basic_features_scenario_rs_test.rs @@ -215,6 +215,11 @@ fn get_caller_rs() { world().run("scenarios/get_caller.scen.json"); } +#[test] +fn get_code_metadata_rs() { + world().run("scenarios/get_code_metadata.scen.json"); +} + #[test] fn get_cumulated_validator_rewards_rs() { world().run("scenarios/get_cumulated_validator_rewards.scen.json"); @@ -374,6 +379,11 @@ fn storage_mapper_fungible_token_rs() { world().run("scenarios/storage_mapper_fungible_token.scen.json"); } +#[test] +fn storage_mapper_get_at_address_rs() { + world().run("scenarios/storage_mapper_get_at_address.scen.json"); +} + #[test] fn storage_mapper_linked_list_rs() { world().run("scenarios/storage_mapper_linked_list.scen.json"); diff --git a/contracts/feature-tests/basic-features/wasm/src/lib.rs b/contracts/feature-tests/basic-features/wasm/src/lib.rs index 2cf279041e..d7ac445e27 100644 --- a/contracts/feature-tests/basic-features/wasm/src/lib.rs +++ b/contracts/feature-tests/basic-features/wasm/src/lib.rs @@ -5,9 +5,9 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 373 +// Endpoints: 374 // Async Callback: 1 -// Total number of exported functions: 375 +// Total number of exported functions: 376 #![no_std] #![allow(internal_features)] @@ -129,6 +129,7 @@ multiversx_sc_wasm_adapter::endpoints! { get_tx_hash => get_tx_hash get_gas_left => get_gas_left get_cumulated_validator_rewards => get_cumulated_validator_rewards + get_code_metadata => get_code_metadata codec_err_finish => codec_err_finish codec_err_storage_key => codec_err_storage_key codec_err_storage_get => codec_err_storage_get diff --git a/framework/base/src/api/blockchain_api.rs b/framework/base/src/api/blockchain_api.rs index 2d156456c1..a429196b96 100644 --- a/framework/base/src/api/blockchain_api.rs +++ b/framework/base/src/api/blockchain_api.rs @@ -1,7 +1,7 @@ use super::{HandleTypeInfo, ManagedTypeApi, ManagedTypeApiImpl, RawHandle}; use crate::types::{ heap::{Address, Box, H256}, - CodeMetadata, EsdtLocalRoleFlags, + EsdtLocalRoleFlags, }; pub trait BlockchainApi: ManagedTypeApi { @@ -61,8 +61,6 @@ pub trait BlockchainApiImpl: ManagedTypeApiImpl { self.load_balance_legacy(dest, &address); } - fn get_code_metadata(&self, address_handle: Self::ManagedBufferHandle) -> CodeMetadata; - fn load_state_root_hash_managed(&self, dest: Self::ManagedBufferHandle); fn get_tx_hash_legacy(&self) -> H256; @@ -148,4 +146,10 @@ pub trait BlockchainApiImpl: ManagedTypeApiImpl { &self, token_id_handle: Self::ManagedBufferHandle, ) -> EsdtLocalRoleFlags; + + fn managed_get_code_metadata( + &self, + address_handle: Self::ManagedBufferHandle, + response_handle: Self::ManagedBufferHandle, + ); } diff --git a/framework/base/src/api/uncallable/blockchain_api_uncallable.rs b/framework/base/src/api/uncallable/blockchain_api_uncallable.rs index 8820a973d7..8a5fec0f62 100644 --- a/framework/base/src/api/uncallable/blockchain_api_uncallable.rs +++ b/framework/base/src/api/uncallable/blockchain_api_uncallable.rs @@ -158,7 +158,11 @@ impl BlockchainApiImpl for UncallableApi { unreachable!() } - fn get_code_metadata(&self, _address_handle: Self::ManagedBufferHandle) -> crate::types::CodeMetadata { + fn managed_get_code_metadata( + &self, + _address_handle: Self::ManagedBufferHandle, + _response_handle: Self::ManagedBufferHandle, + ) { unreachable!() } } diff --git a/framework/base/src/contract_base/wrappers/blockchain_wrapper.rs b/framework/base/src/contract_base/wrappers/blockchain_wrapper.rs index cba1027808..4c3f558dcd 100644 --- a/framework/base/src/contract_base/wrappers/blockchain_wrapper.rs +++ b/framework/base/src/contract_base/wrappers/blockchain_wrapper.rs @@ -10,7 +10,9 @@ use crate::{ err_msg::{ONLY_OWNER_CALLER, ONLY_USER_ACCOUNT_CALLER}, storage::{self}, types::{ - BackTransfers, BigUint, CodeMetadata, EgldOrEsdtTokenIdentifier, EsdtLocalRoleFlags, EsdtTokenData, EsdtTokenType, ManagedAddress, ManagedBuffer, ManagedByteArray, ManagedType, ManagedVec, TokenIdentifier + BackTransfers, BigUint, CodeMetadata, EgldOrEsdtTokenIdentifier, EsdtLocalRoleFlags, + EsdtTokenData, EsdtTokenType, ManagedAddress, ManagedBuffer, ManagedByteArray, ManagedType, + ManagedVec, TokenIdentifier, }, }; @@ -135,7 +137,12 @@ where #[inline] pub fn get_code_metadata(&self, address: &ManagedAddress) -> CodeMetadata { - A::blockchain_api_impl().get_code_metadata(address.get_handle()) + let mbuf_temp_1: A::ManagedBufferHandle = use_raw_handle(const_handles::MBUF_TEMPORARY_1); + A::blockchain_api_impl() + .managed_get_code_metadata(address.get_handle(), mbuf_temp_1.clone()); + let mut buffer = [0u8; 2]; + ManagedBuffer::::from_handle(mbuf_temp_1).load_to_byte_array(&mut buffer); + CodeMetadata::from(buffer) } #[inline] diff --git a/framework/scenario/src/api/core_api_vh/blockchain_api_vh.rs b/framework/scenario/src/api/core_api_vh/blockchain_api_vh.rs index 4b7fb7f334..d5066af0dc 100644 --- a/framework/scenario/src/api/core_api_vh/blockchain_api_vh.rs +++ b/framework/scenario/src/api/core_api_vh/blockchain_api_vh.rs @@ -268,11 +268,16 @@ impl BlockchainApiImpl for VMHooksApi { multiversx_sc::types::EsdtLocalRoleFlags::from_bits_retain(result as u64) } - fn get_code_metadata( + fn managed_get_code_metadata( &self, address_handle: Self::ManagedBufferHandle, - ) -> multiversx_sc::types::CodeMetadata { - let result = - self.with_vm_hooks(|vh| vh.managed_get_code_metadata(address_handle.get_raw_handle())); + response_handle: Self::ManagedBufferHandle, + ) { + self.with_vm_hooks(|vh| { + vh.managed_get_code_metadata( + address_handle.get_raw_handle_unchecked(), + response_handle.get_raw_handle_unchecked(), + ) + }); } } diff --git a/framework/wasm-adapter/src/api/blockchain_api_node.rs b/framework/wasm-adapter/src/api/blockchain_api_node.rs index 1a62beecbc..c9aa00d915 100644 --- a/framework/wasm-adapter/src/api/blockchain_api_node.rs +++ b/framework/wasm-adapter/src/api/blockchain_api_node.rs @@ -84,7 +84,7 @@ extern "C" { fn getESDTLocalRoles(tokenhandle: i32) -> i64; - fn managedGetCodeMetadata(address_handle: i32) -> u16; + fn managedGetCodeMetadata(addressHandle: i32, resultHandle: i32); } impl BlockchainApi for VmApiImpl { @@ -363,12 +363,13 @@ impl BlockchainApiImpl for VmApiImpl { } as u64) } - fn get_code_metadata( + fn managed_get_code_metadata( &self, address_handle: Self::ManagedBufferHandle, - ) -> multiversx_sc::types::CodeMetadata { - multiversx_sc::types::CodeMetadata::from_bits_retain(unsafe { - managedGetCodeMetadata(address_handle) - }) + response_handle: Self::ManagedBufferHandle, + ) { + unsafe { + managedGetCodeMetadata(address_handle, response_handle); + } } } diff --git a/vm/src/vm_hooks/vh_dispatcher.rs b/vm/src/vm_hooks/vh_dispatcher.rs index d0e8bde6de..33a7e47ad7 100644 --- a/vm/src/vm_hooks/vh_dispatcher.rs +++ b/vm/src/vm_hooks/vh_dispatcher.rs @@ -938,8 +938,9 @@ impl VMHooks for VMHooksDispatcher { self.handler.mb_to_hex(source_handle, dest_handle); } - fn managed_get_code_metadata(&self, address_handle: i32) -> crate::types::VMCodeMetadata { - self.handler.get_code_metadata(address_handle) + fn managed_get_code_metadata(&self, address_handle: i32, response_handle: i32) { + self.handler + .managed_get_code_metadata(address_handle, response_handle); } fn managed_is_builtin_function(&self, function_name_handle: i32) -> i32 { diff --git a/vm/src/vm_hooks/vh_handler/vh_blockchain.rs b/vm/src/vm_hooks/vh_handler/vh_blockchain.rs index 96e8f28961..0f0c937a2b 100644 --- a/vm/src/vm_hooks/vh_handler/vh_blockchain.rs +++ b/vm/src/vm_hooks/vh_handler/vh_blockchain.rs @@ -1,5 +1,5 @@ use crate::{ - types::{EsdtLocalRole, EsdtLocalRoleFlags, RawHandle, VMAddress, VMCodeMetadata}, + types::{EsdtLocalRole, EsdtLocalRoleFlags, RawHandle, VMAddress}, vm_hooks::VMHooksHandlerSource, world_mock::{EsdtData, EsdtInstance}, }; @@ -138,13 +138,17 @@ pub trait VMHooksBlockchain: VMHooksHandlerSource { self.m_types_lock().bi_overwrite(dest, esdt_balance.into()); } - fn get_code_metadata( - &self, - address_handle: RawHandle, - ) -> VMCodeMetadata { + fn managed_get_code_metadata(&self, address_handle: i32, response_handle: i32) { let address = VMAddress::from_slice(self.m_types_lock().mb_get(address_handle)); - let data = self.account_data(&address).unwrap(); - data.code_metadata + let Some(data) = self.account_data(&address) else { + self.vm_error(&format!( + "account not found: {}", + hex::encode(address.as_bytes()) + )) + }; + let code_metadata_bytes = data.code_metadata.to_byte_array(); + self.m_types_lock() + .mb_set(response_handle, code_metadata_bytes.to_vec()) } #[allow(clippy::too_many_arguments)] From adcb20c2c3b65269d9ef19779d278a0713bd8d43 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Fri, 26 Jan 2024 14:10:23 +0200 Subject: [PATCH 3/5] cargo fmt --- .../benchmarks/mappers/map-repeat/tests/scenario_rs_test.rs | 5 ++++- .../benchmarks/mappers/set-repeat/tests/scenario_rs_test.rs | 5 ++++- .../benchmarks/mappers/vec-repeat/tests/scenario_rs_test.rs | 5 ++++- contracts/benchmarks/str-repeat/tests/scenario_rs_test.rs | 5 ++++- contracts/examples/adder/interact/src/adder_interact.rs | 6 ++++-- .../examples/factorial/tests/factorial_scenario_rs_test.rs | 5 ++++- .../examples/multisig/tests/multisig_scenario_rs_test.rs | 5 ++++- .../nft-minter/tests/nft_minter_scenario_rs_test.rs | 5 ++++- .../proxy-pause/tests/proxy_pause_scenario_rs_test.rs | 5 ++++- .../composability/tests/promises_feature_blackbox_test.rs | 3 ++- .../tests/crowdfunding_erc20_scenario_rs_test.rs | 5 ++++- .../lottery-erc20/tests/lottery_erc20_scenario_rs_test.rs | 5 ++++- .../use-module/tests/use_module_scenario_rs_test.rs | 5 ++++- 13 files changed, 50 insertions(+), 14 deletions(-) diff --git a/contracts/benchmarks/mappers/map-repeat/tests/scenario_rs_test.rs b/contracts/benchmarks/mappers/map-repeat/tests/scenario_rs_test.rs index d1d78e6cb1..8ae30eaf45 100644 --- a/contracts/benchmarks/mappers/map-repeat/tests/scenario_rs_test.rs +++ b/contracts/benchmarks/mappers/map-repeat/tests/scenario_rs_test.rs @@ -4,7 +4,10 @@ fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); blockchain.set_current_dir_from_workspace("contracts/benchmarks/mappers/map-repeat"); - blockchain.register_contract("mxsc:output/map-repeat.mxsc.json", map_repeat::ContractBuilder); + blockchain.register_contract( + "mxsc:output/map-repeat.mxsc.json", + map_repeat::ContractBuilder, + ); blockchain } diff --git a/contracts/benchmarks/mappers/set-repeat/tests/scenario_rs_test.rs b/contracts/benchmarks/mappers/set-repeat/tests/scenario_rs_test.rs index 77f5338006..ba9fda4f46 100644 --- a/contracts/benchmarks/mappers/set-repeat/tests/scenario_rs_test.rs +++ b/contracts/benchmarks/mappers/set-repeat/tests/scenario_rs_test.rs @@ -4,7 +4,10 @@ fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); blockchain.set_current_dir_from_workspace("contracts/benchmarks/mappers/set-repeat"); - blockchain.register_contract("mxsc:output/set-repeat.mxsc.json", set_repeat::ContractBuilder); + blockchain.register_contract( + "mxsc:output/set-repeat.mxsc.json", + set_repeat::ContractBuilder, + ); blockchain } diff --git a/contracts/benchmarks/mappers/vec-repeat/tests/scenario_rs_test.rs b/contracts/benchmarks/mappers/vec-repeat/tests/scenario_rs_test.rs index 220f3e55fa..49407163df 100644 --- a/contracts/benchmarks/mappers/vec-repeat/tests/scenario_rs_test.rs +++ b/contracts/benchmarks/mappers/vec-repeat/tests/scenario_rs_test.rs @@ -4,7 +4,10 @@ fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); blockchain.set_current_dir_from_workspace("contracts/benchmarks/mappers/vec-repeat"); - blockchain.register_contract("mxsc:output/vec-repeat.mxsc.json", vec_repeat::ContractBuilder); + blockchain.register_contract( + "mxsc:output/vec-repeat.mxsc.json", + vec_repeat::ContractBuilder, + ); blockchain } diff --git a/contracts/benchmarks/str-repeat/tests/scenario_rs_test.rs b/contracts/benchmarks/str-repeat/tests/scenario_rs_test.rs index 741a494df1..42f585f314 100644 --- a/contracts/benchmarks/str-repeat/tests/scenario_rs_test.rs +++ b/contracts/benchmarks/str-repeat/tests/scenario_rs_test.rs @@ -2,7 +2,10 @@ use multiversx_sc_scenario::*; fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); - blockchain.register_contract("mxsc:output/str-repeat.mxsc.json", str_repeat::ContractBuilder); + blockchain.register_contract( + "mxsc:output/str-repeat.mxsc.json", + str_repeat::ContractBuilder, + ); blockchain } diff --git a/contracts/examples/adder/interact/src/adder_interact.rs b/contracts/examples/adder/interact/src/adder_interact.rs index a0ed636947..10df4ddf61 100644 --- a/contracts/examples/adder/interact/src/adder_interact.rs +++ b/contracts/examples/adder/interact/src/adder_interact.rs @@ -69,8 +69,10 @@ impl AdderInteract { .with_tracer(INTERACTOR_SCENARIO_TRACE_PATH) .await; let wallet_address = interactor.register_wallet(test_wallets::mike()); - let adder_code = - BytesValue::interpret_from("mxsc:../output/adder.mxsc.json", &InterpreterContext::default()); + let adder_code = BytesValue::interpret_from( + "mxsc:../output/adder.mxsc.json", + &InterpreterContext::default(), + ); Self { interactor, diff --git a/contracts/examples/factorial/tests/factorial_scenario_rs_test.rs b/contracts/examples/factorial/tests/factorial_scenario_rs_test.rs index 7fe36b98bf..5f55080950 100644 --- a/contracts/examples/factorial/tests/factorial_scenario_rs_test.rs +++ b/contracts/examples/factorial/tests/factorial_scenario_rs_test.rs @@ -4,7 +4,10 @@ fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); blockchain.set_current_dir_from_workspace("contracts/examples/factorial"); - blockchain.register_contract("mxsc:output/factorial.mxsc.json", factorial::ContractBuilder); + blockchain.register_contract( + "mxsc:output/factorial.mxsc.json", + factorial::ContractBuilder, + ); blockchain } diff --git a/contracts/examples/multisig/tests/multisig_scenario_rs_test.rs b/contracts/examples/multisig/tests/multisig_scenario_rs_test.rs index 4687c335e1..8a606bffd8 100644 --- a/contracts/examples/multisig/tests/multisig_scenario_rs_test.rs +++ b/contracts/examples/multisig/tests/multisig_scenario_rs_test.rs @@ -17,7 +17,10 @@ fn world() -> ScenarioWorld { "multisig-view", ); - blockchain.register_contract("mxsc:test-contracts/adder.mxsc.json", adder::ContractBuilder); + blockchain.register_contract( + "mxsc:test-contracts/adder.mxsc.json", + adder::ContractBuilder, + ); blockchain.register_contract( "mxsc:test-contracts/factorial.mxsc.json", diff --git a/contracts/examples/nft-minter/tests/nft_minter_scenario_rs_test.rs b/contracts/examples/nft-minter/tests/nft_minter_scenario_rs_test.rs index f0e564a249..db79559f43 100644 --- a/contracts/examples/nft-minter/tests/nft_minter_scenario_rs_test.rs +++ b/contracts/examples/nft-minter/tests/nft_minter_scenario_rs_test.rs @@ -4,7 +4,10 @@ fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); blockchain.set_current_dir_from_workspace("contracts/examples/nft-minter"); - blockchain.register_contract("mxsc:output/nft-minter.mxsc.json", nft_minter::ContractBuilder); + blockchain.register_contract( + "mxsc:output/nft-minter.mxsc.json", + nft_minter::ContractBuilder, + ); blockchain } diff --git a/contracts/examples/proxy-pause/tests/proxy_pause_scenario_rs_test.rs b/contracts/examples/proxy-pause/tests/proxy_pause_scenario_rs_test.rs index 874c939739..41c563d7c7 100644 --- a/contracts/examples/proxy-pause/tests/proxy_pause_scenario_rs_test.rs +++ b/contracts/examples/proxy-pause/tests/proxy_pause_scenario_rs_test.rs @@ -4,7 +4,10 @@ fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); blockchain.set_current_dir_from_workspace("contracts/examples/proxy-pause"); - blockchain.register_contract("mxsc:output/proxy-pause.mxsc.json", proxy_pause::ContractBuilder); + blockchain.register_contract( + "mxsc:output/proxy-pause.mxsc.json", + proxy_pause::ContractBuilder, + ); blockchain.register_contract( "mxsc:../check-pause/output/check-pause.mxsc.json", diff --git a/contracts/feature-tests/composability/tests/promises_feature_blackbox_test.rs b/contracts/feature-tests/composability/tests/promises_feature_blackbox_test.rs index 78084581b0..a2ee00c631 100644 --- a/contracts/feature-tests/composability/tests/promises_feature_blackbox_test.rs +++ b/contracts/feature-tests/composability/tests/promises_feature_blackbox_test.rs @@ -9,7 +9,8 @@ use promises_features::call_sync_bt::ProxyTrait; const USER_ADDRESS_EXPR: &str = "address:user"; const PROMISES_FEATURE_ADDRESS_EXPR: &str = "sc:promises-feature"; -const PROMISES_FEATURES_PATH_EXPR: &str = "mxsc:promises-features/output/promises-feature.mxsc.json"; +const PROMISES_FEATURES_PATH_EXPR: &str = + "mxsc:promises-features/output/promises-feature.mxsc.json"; const VAULT_ADDRESS_EXPR: &str = "sc:vault"; const VAULT_PATH_EXPR: &str = "mxsc:../vault/output/vault.mxsc.json"; diff --git a/contracts/feature-tests/erc-style-contracts/crowdfunding-erc20/tests/crowdfunding_erc20_scenario_rs_test.rs b/contracts/feature-tests/erc-style-contracts/crowdfunding-erc20/tests/crowdfunding_erc20_scenario_rs_test.rs index 189a41f27c..e14767b48f 100644 --- a/contracts/feature-tests/erc-style-contracts/crowdfunding-erc20/tests/crowdfunding_erc20_scenario_rs_test.rs +++ b/contracts/feature-tests/erc-style-contracts/crowdfunding-erc20/tests/crowdfunding_erc20_scenario_rs_test.rs @@ -11,7 +11,10 @@ fn world() -> ScenarioWorld { crowdfunding_erc20::ContractBuilder, ); - blockchain.register_contract("mxsc:../erc20/output/erc20.mxsc.json", erc20::ContractBuilder); + blockchain.register_contract( + "mxsc:../erc20/output/erc20.mxsc.json", + erc20::ContractBuilder, + ); blockchain } diff --git a/contracts/feature-tests/erc-style-contracts/lottery-erc20/tests/lottery_erc20_scenario_rs_test.rs b/contracts/feature-tests/erc-style-contracts/lottery-erc20/tests/lottery_erc20_scenario_rs_test.rs index 7d958d67f8..ed82fb71bb 100644 --- a/contracts/feature-tests/erc-style-contracts/lottery-erc20/tests/lottery_erc20_scenario_rs_test.rs +++ b/contracts/feature-tests/erc-style-contracts/lottery-erc20/tests/lottery_erc20_scenario_rs_test.rs @@ -11,7 +11,10 @@ fn world() -> ScenarioWorld { lottery_erc20::ContractBuilder, ); - blockchain.register_contract("mxsc:../erc20/output/erc20.mxsc.json", erc20::ContractBuilder); + blockchain.register_contract( + "mxsc:../erc20/output/erc20.mxsc.json", + erc20::ContractBuilder, + ); blockchain } diff --git a/contracts/feature-tests/use-module/tests/use_module_scenario_rs_test.rs b/contracts/feature-tests/use-module/tests/use_module_scenario_rs_test.rs index 0b48711aa5..2ecb798d24 100644 --- a/contracts/feature-tests/use-module/tests/use_module_scenario_rs_test.rs +++ b/contracts/feature-tests/use-module/tests/use_module_scenario_rs_test.rs @@ -33,7 +33,10 @@ use multiversx_sc_scenario::*; fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); - blockchain.register_contract("mxsc:output/use-module.mxsc.json", use_module::ContractBuilder); + blockchain.register_contract( + "mxsc:output/use-module.mxsc.json", + use_module::ContractBuilder, + ); blockchain.register_contract( "mxsc:test-wasm/elrond-wasm-sc-dns.mxsc.json", From 3d1a87a38d1a9d9804cce1e192ca909f18da0a29 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Sun, 28 Jan 2024 22:24:05 +0200 Subject: [PATCH 4/5] scenario fmt --- .../scenarios/stress_submit_test.scen.json | 103 ----- ...ss_submit_with_gas_schedule_test.scen.json | 412 +++++------------- .../scenarios/interactor_trace.scen.json | 20 +- .../scenarios/interactor_wegld.scen.json | 60 +-- .../scenarios/big_uint_pow.scen.json | 6 +- .../scenarios/small_num_overflow.scen.json | 35 +- .../storage_mapper_get_at_address.scen.json | 2 +- .../promises_single_transfer.scen.json | 8 +- 8 files changed, 144 insertions(+), 502 deletions(-) diff --git a/contracts/core/price-aggregator/scenarios/stress_submit_test.scen.json b/contracts/core/price-aggregator/scenarios/stress_submit_test.scen.json index f14a5ef684..72d06e6316 100644 --- a/contracts/core/price-aggregator/scenarios/stress_submit_test.scen.json +++ b/contracts/core/price-aggregator/scenarios/stress_submit_test.scen.json @@ -220,7 +220,6 @@ }, { "step": "scDeploy", - "id": "", "tx": { "from": "address:owner", "contractCode": "mxsc:../output/multiversx-price-aggregator-sc.mxsc.json", @@ -290,7 +289,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle1", "to": "sc:price-aggregator", @@ -306,7 +304,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle2", "to": "sc:price-aggregator", @@ -322,7 +319,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle3", "to": "sc:price-aggregator", @@ -338,7 +334,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle4", "to": "sc:price-aggregator", @@ -354,7 +349,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle5", "to": "sc:price-aggregator", @@ -370,7 +364,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle6", "to": "sc:price-aggregator", @@ -386,7 +379,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle7", "to": "sc:price-aggregator", @@ -402,7 +394,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle8", "to": "sc:price-aggregator", @@ -418,7 +409,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle9", "to": "sc:price-aggregator", @@ -434,7 +424,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle10", "to": "sc:price-aggregator", @@ -450,7 +439,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle11", "to": "sc:price-aggregator", @@ -466,7 +454,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle12", "to": "sc:price-aggregator", @@ -482,7 +469,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle13", "to": "sc:price-aggregator", @@ -498,7 +484,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle14", "to": "sc:price-aggregator", @@ -514,7 +499,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle15", "to": "sc:price-aggregator", @@ -530,7 +514,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle16", "to": "sc:price-aggregator", @@ -546,7 +529,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle17", "to": "sc:price-aggregator", @@ -562,7 +544,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle18", "to": "sc:price-aggregator", @@ -578,7 +559,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle19", "to": "sc:price-aggregator", @@ -594,7 +574,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle20", "to": "sc:price-aggregator", @@ -610,7 +589,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle21", "to": "sc:price-aggregator", @@ -626,7 +604,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle22", "to": "sc:price-aggregator", @@ -642,7 +619,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle23", "to": "sc:price-aggregator", @@ -658,7 +634,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle24", "to": "sc:price-aggregator", @@ -674,7 +649,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle25", "to": "sc:price-aggregator", @@ -690,7 +664,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle26", "to": "sc:price-aggregator", @@ -706,7 +679,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle27", "to": "sc:price-aggregator", @@ -722,7 +694,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle28", "to": "sc:price-aggregator", @@ -738,7 +709,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle29", "to": "sc:price-aggregator", @@ -754,7 +724,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle30", "to": "sc:price-aggregator", @@ -770,7 +739,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle31", "to": "sc:price-aggregator", @@ -786,7 +754,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle32", "to": "sc:price-aggregator", @@ -802,7 +769,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle33", "to": "sc:price-aggregator", @@ -818,7 +784,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle34", "to": "sc:price-aggregator", @@ -834,7 +799,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle35", "to": "sc:price-aggregator", @@ -850,7 +814,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle36", "to": "sc:price-aggregator", @@ -866,7 +829,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle37", "to": "sc:price-aggregator", @@ -882,7 +844,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle38", "to": "sc:price-aggregator", @@ -898,7 +859,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle39", "to": "sc:price-aggregator", @@ -914,7 +874,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle40", "to": "sc:price-aggregator", @@ -930,7 +889,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle41", "to": "sc:price-aggregator", @@ -946,7 +904,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle42", "to": "sc:price-aggregator", @@ -962,7 +919,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle43", "to": "sc:price-aggregator", @@ -978,7 +934,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle44", "to": "sc:price-aggregator", @@ -994,7 +949,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle45", "to": "sc:price-aggregator", @@ -1010,7 +964,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle46", "to": "sc:price-aggregator", @@ -1026,7 +979,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle47", "to": "sc:price-aggregator", @@ -1042,7 +994,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle48", "to": "sc:price-aggregator", @@ -1058,7 +1009,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle49", "to": "sc:price-aggregator", @@ -1074,7 +1024,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle50", "to": "sc:price-aggregator", @@ -1090,7 +1039,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:owner", "to": "sc:price-aggregator", @@ -1109,7 +1057,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:owner", "to": "sc:price-aggregator", @@ -1124,7 +1071,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle1", "to": "sc:price-aggregator", @@ -1145,7 +1091,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle2", "to": "sc:price-aggregator", @@ -1166,7 +1111,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle3", "to": "sc:price-aggregator", @@ -1187,7 +1131,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle4", "to": "sc:price-aggregator", @@ -1208,7 +1151,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle5", "to": "sc:price-aggregator", @@ -1229,7 +1171,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle6", "to": "sc:price-aggregator", @@ -1250,7 +1191,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle7", "to": "sc:price-aggregator", @@ -1271,7 +1211,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle8", "to": "sc:price-aggregator", @@ -1292,7 +1231,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle9", "to": "sc:price-aggregator", @@ -1313,7 +1251,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle10", "to": "sc:price-aggregator", @@ -1334,7 +1271,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle11", "to": "sc:price-aggregator", @@ -1355,7 +1291,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle12", "to": "sc:price-aggregator", @@ -1376,7 +1311,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle13", "to": "sc:price-aggregator", @@ -1397,7 +1331,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle14", "to": "sc:price-aggregator", @@ -1418,7 +1351,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle15", "to": "sc:price-aggregator", @@ -1439,7 +1371,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle16", "to": "sc:price-aggregator", @@ -1460,7 +1391,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle17", "to": "sc:price-aggregator", @@ -1481,7 +1411,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle18", "to": "sc:price-aggregator", @@ -1502,7 +1431,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle19", "to": "sc:price-aggregator", @@ -1523,7 +1451,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle20", "to": "sc:price-aggregator", @@ -1544,7 +1471,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle21", "to": "sc:price-aggregator", @@ -1565,7 +1491,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle22", "to": "sc:price-aggregator", @@ -1586,7 +1511,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle23", "to": "sc:price-aggregator", @@ -1607,7 +1531,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle24", "to": "sc:price-aggregator", @@ -1628,7 +1551,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle25", "to": "sc:price-aggregator", @@ -1649,7 +1571,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle26", "to": "sc:price-aggregator", @@ -1670,7 +1591,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle27", "to": "sc:price-aggregator", @@ -1691,7 +1611,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle28", "to": "sc:price-aggregator", @@ -1712,7 +1631,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle29", "to": "sc:price-aggregator", @@ -1733,7 +1651,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle30", "to": "sc:price-aggregator", @@ -1754,7 +1671,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle31", "to": "sc:price-aggregator", @@ -1775,7 +1691,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle32", "to": "sc:price-aggregator", @@ -1796,7 +1711,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle33", "to": "sc:price-aggregator", @@ -1817,7 +1731,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle34", "to": "sc:price-aggregator", @@ -1838,7 +1751,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle35", "to": "sc:price-aggregator", @@ -1859,7 +1771,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle36", "to": "sc:price-aggregator", @@ -1880,7 +1791,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle37", "to": "sc:price-aggregator", @@ -1901,7 +1811,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle38", "to": "sc:price-aggregator", @@ -1922,7 +1831,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle39", "to": "sc:price-aggregator", @@ -1943,7 +1851,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle40", "to": "sc:price-aggregator", @@ -1964,7 +1871,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle41", "to": "sc:price-aggregator", @@ -1985,7 +1891,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle42", "to": "sc:price-aggregator", @@ -2006,7 +1911,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle43", "to": "sc:price-aggregator", @@ -2027,7 +1931,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle44", "to": "sc:price-aggregator", @@ -2048,7 +1951,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle45", "to": "sc:price-aggregator", @@ -2069,7 +1971,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle46", "to": "sc:price-aggregator", @@ -2090,7 +1991,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle47", "to": "sc:price-aggregator", @@ -2111,7 +2011,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle48", "to": "sc:price-aggregator", @@ -2132,7 +2031,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle49", "to": "sc:price-aggregator", @@ -2153,7 +2051,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle50", "to": "sc:price-aggregator", diff --git a/contracts/core/price-aggregator/scenarios/stress_submit_with_gas_schedule_test.scen.json b/contracts/core/price-aggregator/scenarios/stress_submit_with_gas_schedule_test.scen.json index 1b2181b41a..efb66e491a 100644 --- a/contracts/core/price-aggregator/scenarios/stress_submit_with_gas_schedule_test.scen.json +++ b/contracts/core/price-aggregator/scenarios/stress_submit_with_gas_schedule_test.scen.json @@ -223,7 +223,6 @@ }, { "step": "scDeploy", - "id": "", "tx": { "from": "address:owner", "contractCode": "mxsc:../output/multiversx-price-aggregator-sc.mxsc.json", @@ -284,8 +283,7 @@ "0x6f7261636c6534395f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f", "0x6f7261636c6535305f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f5f" ], - "gasLimit": "120,000,000", - "gasPrice": "" + "gasLimit": "120,000,000" }, "expect": { "out": [], @@ -295,15 +293,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle1", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -313,15 +309,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle2", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -331,15 +325,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle3", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -349,15 +341,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle4", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -367,15 +357,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle5", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -385,15 +373,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle6", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -403,15 +389,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle7", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -421,15 +405,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle8", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -439,15 +421,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle9", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -457,15 +437,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle10", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -475,15 +453,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle11", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -493,15 +469,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle12", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -511,15 +485,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle13", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -529,15 +501,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle14", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -547,15 +517,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle15", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -565,15 +533,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle16", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -583,15 +549,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle17", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -601,15 +565,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle18", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -619,15 +581,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle19", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -637,15 +597,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle20", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -655,15 +613,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle21", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -673,15 +629,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle22", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -691,15 +645,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle23", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -709,15 +661,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle24", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -727,15 +677,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle25", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -745,15 +693,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle26", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -763,15 +709,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle27", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -781,15 +725,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle28", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -799,15 +741,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle29", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -817,15 +757,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle30", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -835,15 +773,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle31", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -853,15 +789,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle32", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -871,15 +805,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle33", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -889,15 +821,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle34", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -907,15 +837,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle35", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -925,15 +853,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle36", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -943,15 +869,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle37", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -961,15 +885,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle38", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -979,15 +901,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle39", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -997,15 +917,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle40", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1015,15 +933,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle41", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1033,15 +949,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle42", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1051,15 +965,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle43", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1069,15 +981,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle44", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1087,15 +997,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle45", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1105,15 +1013,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle46", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1123,15 +1029,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle47", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1141,15 +1045,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle48", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1159,15 +1061,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle49", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1177,15 +1077,13 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle50", "to": "sc:price-aggregator", "egldValue": "20", "function": "stake", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1195,7 +1093,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:owner", "to": "sc:price-aggregator", @@ -1205,8 +1102,7 @@ "0x55534443", "0x" ], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1216,14 +1112,12 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:owner", "to": "sc:price-aggregator", "function": "unpause", "arguments": [], - "gasLimit": "5,000,000", - "gasPrice": "" + "gasLimit": "5,000,000" }, "expect": { "out": [], @@ -1233,7 +1127,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle1", "to": "sc:price-aggregator", @@ -1245,8 +1138,7 @@ "0x619911dbb570258c", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1256,7 +1148,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle2", "to": "sc:price-aggregator", @@ -1268,8 +1159,7 @@ "0x3cf8d3d3a05bf655", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1279,7 +1169,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle3", "to": "sc:price-aggregator", @@ -1291,8 +1180,7 @@ "0x4d92440172e0bf71", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1302,7 +1190,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle4", "to": "sc:price-aggregator", @@ -1314,8 +1201,7 @@ "0xd971ed41066daa08", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1325,7 +1211,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle5", "to": "sc:price-aggregator", @@ -1337,8 +1222,7 @@ "0x34a9348cb04afbd1", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1348,7 +1232,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle6", "to": "sc:price-aggregator", @@ -1360,8 +1243,7 @@ "0x6c01a77d55c0861f", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1371,7 +1253,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle7", "to": "sc:price-aggregator", @@ -1383,8 +1264,7 @@ "0xea1e93f2b82ec0f6", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1394,7 +1274,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle8", "to": "sc:price-aggregator", @@ -1406,8 +1285,7 @@ "0x2f067fee00bbd5bc", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1417,7 +1295,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle9", "to": "sc:price-aggregator", @@ -1429,8 +1306,7 @@ "0x1706fe5397a21f74", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1440,7 +1316,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle10", "to": "sc:price-aggregator", @@ -1452,8 +1327,7 @@ "0xbffd5631e9e448a8", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1463,7 +1337,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle11", "to": "sc:price-aggregator", @@ -1475,8 +1348,7 @@ "0x1940496d3bc8934c", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1486,7 +1358,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle12", "to": "sc:price-aggregator", @@ -1498,8 +1369,7 @@ "0xbd0af0d3aba30235", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1509,7 +1379,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle13", "to": "sc:price-aggregator", @@ -1521,8 +1390,7 @@ "0xebcf9494ec0fac0c", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1532,7 +1400,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle14", "to": "sc:price-aggregator", @@ -1544,8 +1411,7 @@ "0x7aeb67c3eabe498c", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1555,7 +1421,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle15", "to": "sc:price-aggregator", @@ -1567,8 +1432,7 @@ "0x5c758d17b8445f7f", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1578,7 +1442,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle16", "to": "sc:price-aggregator", @@ -1590,8 +1453,7 @@ "0x6978fe48b9a58974", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1601,7 +1463,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle17", "to": "sc:price-aggregator", @@ -1613,8 +1474,7 @@ "0x8692c26f665bc7ad", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1624,7 +1484,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle18", "to": "sc:price-aggregator", @@ -1636,8 +1495,7 @@ "0x2d3a93b7522e72b6", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1647,7 +1505,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle19", "to": "sc:price-aggregator", @@ -1659,8 +1516,7 @@ "0x4faa49415e935688", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1670,7 +1526,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle20", "to": "sc:price-aggregator", @@ -1682,8 +1537,7 @@ "0x5cbca2cc253dbf54", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1693,7 +1547,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle21", "to": "sc:price-aggregator", @@ -1705,8 +1558,7 @@ "0xdd20d194dd695735", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1716,7 +1568,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle22", "to": "sc:price-aggregator", @@ -1728,8 +1579,7 @@ "0x32f039c1765a2ec3", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1739,7 +1589,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle23", "to": "sc:price-aggregator", @@ -1751,8 +1600,7 @@ "0x84372c9de3d535d9", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1762,7 +1610,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle24", "to": "sc:price-aggregator", @@ -1774,8 +1621,7 @@ "0x91b23ed59de93417", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1785,7 +1631,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle25", "to": "sc:price-aggregator", @@ -1797,8 +1642,7 @@ "0x4b81d1a55887f5f9", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1808,7 +1652,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle26", "to": "sc:price-aggregator", @@ -1820,8 +1663,7 @@ "0xd88e348ef6679e1d", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1831,7 +1673,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle27", "to": "sc:price-aggregator", @@ -1843,8 +1684,7 @@ "0x2557834dc8059cc7", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1854,7 +1694,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle28", "to": "sc:price-aggregator", @@ -1866,8 +1705,7 @@ "0x22d86f8317546033", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1877,7 +1715,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle29", "to": "sc:price-aggregator", @@ -1889,8 +1726,7 @@ "0x5a775ddd32ca5367", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1900,7 +1736,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle30", "to": "sc:price-aggregator", @@ -1912,8 +1747,7 @@ "0x59f049471cd2662c", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1923,7 +1757,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle31", "to": "sc:price-aggregator", @@ -1935,8 +1768,7 @@ "0xb59fdc2aedbf845f", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1946,7 +1778,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle32", "to": "sc:price-aggregator", @@ -1958,8 +1789,7 @@ "0xab13e96eb802f883", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1969,7 +1799,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle33", "to": "sc:price-aggregator", @@ -1981,8 +1810,7 @@ "0xf6f152ab53ad7170", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -1992,7 +1820,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle34", "to": "sc:price-aggregator", @@ -2004,8 +1831,7 @@ "0x5bae78b87d516979", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2015,7 +1841,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle35", "to": "sc:price-aggregator", @@ -2027,8 +1852,7 @@ "0xe47859cc0fdb0abe", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2038,7 +1862,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle36", "to": "sc:price-aggregator", @@ -2050,8 +1873,7 @@ "0x7c36ab1fa1a348b4", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2061,7 +1883,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle37", "to": "sc:price-aggregator", @@ -2073,8 +1894,7 @@ "0x7fda3ef39b74e04b", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2084,7 +1904,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle38", "to": "sc:price-aggregator", @@ -2096,8 +1915,7 @@ "0x461d81a84db50115", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2107,7 +1925,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle39", "to": "sc:price-aggregator", @@ -2119,8 +1936,7 @@ "0xcc0ab8ccc363dd0c", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2130,7 +1946,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle40", "to": "sc:price-aggregator", @@ -2142,8 +1957,7 @@ "0x11c15058c7c6c1fa", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2153,7 +1967,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle41", "to": "sc:price-aggregator", @@ -2165,8 +1978,7 @@ "0x293b700535555d4f", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2176,7 +1988,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle42", "to": "sc:price-aggregator", @@ -2188,8 +1999,7 @@ "0x4e8d04d2f0e53efd", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2199,7 +2009,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle43", "to": "sc:price-aggregator", @@ -2211,8 +2020,7 @@ "0x42be3651d7b9499e", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2222,7 +2030,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle44", "to": "sc:price-aggregator", @@ -2234,8 +2041,7 @@ "0xb82a437fc87cd8a0", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2245,7 +2051,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle45", "to": "sc:price-aggregator", @@ -2257,8 +2062,7 @@ "0xb12ebd0d9ff3f396", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2268,7 +2072,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle46", "to": "sc:price-aggregator", @@ -2280,8 +2083,7 @@ "0x85b4d01e5a20d445", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2291,7 +2093,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle47", "to": "sc:price-aggregator", @@ -2303,8 +2104,7 @@ "0x92edaca582002375", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2314,7 +2114,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle48", "to": "sc:price-aggregator", @@ -2326,8 +2125,7 @@ "0x351151b47fee6331", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2337,7 +2135,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle49", "to": "sc:price-aggregator", @@ -2349,8 +2146,7 @@ "0x9155d2992ceb6beb", "0x" ], - "gasLimit": "7,000,000", - "gasPrice": "" + "gasLimit": "7,000,000" }, "expect": { "out": [], @@ -2360,7 +2156,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "address:oracle50", "to": "sc:price-aggregator", @@ -2372,8 +2167,7 @@ "0xdbc0895ce5855dec", "0x" ], - "gasLimit": "50,000,000", - "gasPrice": "" + "gasLimit": "50,000,000" }, "expect": { "out": [], diff --git a/contracts/examples/adder/scenarios/interactor_trace.scen.json b/contracts/examples/adder/scenarios/interactor_trace.scen.json index fb077ddb6a..e0824697fe 100644 --- a/contracts/examples/adder/scenarios/interactor_trace.scen.json +++ b/contracts/examples/adder/scenarios/interactor_trace.scen.json @@ -11,8 +11,7 @@ "str:CAN-2abf4b": "1000", "str:CAN-6d39e6": "1000", "str:CAN-ac1592": "1000" - }, - "username": "" + } } } }, @@ -28,23 +27,21 @@ }, { "step": "scDeploy", - "id": "", "tx": { "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", "contractCode": "mxsc:../output/adder.mxsc.json", "arguments": [ "0x00" ], - "gasLimit": "70,000,000", - "gasPrice": "" + "gasLimit": "70,000,000" }, "expect": { + "out": [], "status": "0" } }, { "step": "scCall", - "id": "", "tx": { "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", "to": "0x0000000000000000050028600ceb73ac22ec0b6f257aff7bed74dffa3ebfed60", @@ -52,16 +49,15 @@ "arguments": [ "0x07" ], - "gasLimit": "70,000,000", - "gasPrice": "" + "gasLimit": "70,000,000" }, "expect": { + "out": [], "status": "0" } }, { "step": "scCall", - "id": "", "tx": { "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", "to": "0x0000000000000000050028600ceb73ac22ec0b6f257aff7bed74dffa3ebfed60", @@ -69,12 +65,12 @@ "arguments": [ "0x05" ], - "gasLimit": "70,000,000", - "gasPrice": "" + "gasLimit": "70,000,000" }, "expect": { + "out": [], "status": "0" } } ] -} \ No newline at end of file +} diff --git a/contracts/examples/multisig/scenarios/interactor_wegld.scen.json b/contracts/examples/multisig/scenarios/interactor_wegld.scen.json index a30e7e6112..15e9fc0386 100644 --- a/contracts/examples/multisig/scenarios/interactor_wegld.scen.json +++ b/contracts/examples/multisig/scenarios/interactor_wegld.scen.json @@ -11,8 +11,7 @@ "str:CAN-2abf4b": "1000", "str:CAN-6d39e6": "1000", "str:CAN-ac1592": "1000" - }, - "username": "" + } } } }, @@ -31,8 +30,7 @@ } ] } - }, - "username": "" + } } } }, @@ -41,8 +39,7 @@ "accounts": { "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17": { "nonce": "179", - "balance": "7777023510140000000", - "username": "" + "balance": "7777023510140000000" } } }, @@ -56,8 +53,7 @@ "str:USDC-091bd3": "9997000000000", "str:XRF-079f0d": "999999805000000000000000000", "str:XUSDC-929b9b": "1000000000000000000000000" - }, - "username": "" + } } } }, @@ -69,14 +65,12 @@ "balance": "54039792195269569513", "esdt": { "str:WEGLD-6cf38e": { - "instances": [], "roles": [ "ESDTRoleLocalBurn", "ESDTRoleLocalMint" ] } }, - "username": "", "storage": { "0x7772617070656445676c64546f6b656e4964": "0x5745474c442d366366333865" }, @@ -96,7 +90,6 @@ }, { "step": "scDeploy", - "id": "", "tx": { "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", "contractCode": "mxsc:../output/multisig.mxsc.json", @@ -107,16 +100,15 @@ "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033" ], - "gasLimit": "70,000,000", - "gasPrice": "" + "gasLimit": "70,000,000" }, "expect": { + "out": [], "status": "0" } }, { "step": "transfer", - "id": "", "tx": { "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -126,7 +118,6 @@ }, { "step": "scCall", - "id": "", "tx": { "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -136,13 +127,11 @@ "0xb1a2bc2ec50000", "0x7772617045676c64" ], - "gasLimit": "10,000,000", - "gasPrice": "" + "gasLimit": "10,000,000" } }, { "step": "scCall", - "id": "", "tx": { "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -150,13 +139,11 @@ "arguments": [ "0x01" ], - "gasLimit": "15,000,000", - "gasPrice": "" + "gasLimit": "15,000,000" } }, { "step": "scCall", - "id": "", "tx": { "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -164,13 +151,11 @@ "arguments": [ "0x01" ], - "gasLimit": "15,000,000", - "gasPrice": "" + "gasLimit": "15,000,000" } }, { "step": "scCall", - "id": "", "tx": { "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -178,13 +163,11 @@ "arguments": [ "0x01" ], - "gasLimit": "15,000,000", - "gasPrice": "" + "gasLimit": "15,000,000" } }, { "step": "scCall", - "id": "", "tx": { "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -192,13 +175,11 @@ "arguments": [ "0x01" ], - "gasLimit": "15,000,000", - "gasPrice": "" + "gasLimit": "15,000,000" } }, { "step": "scCall", - "id": "", "tx": { "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -211,13 +192,11 @@ "0x58d15e17628000", "0x756e7772617045676c64" ], - "gasLimit": "10,000,000", - "gasPrice": "" + "gasLimit": "10,000,000" } }, { "step": "scCall", - "id": "", "tx": { "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -225,13 +204,11 @@ "arguments": [ "0x02" ], - "gasLimit": "15,000,000", - "gasPrice": "" + "gasLimit": "15,000,000" } }, { "step": "scCall", - "id": "", "tx": { "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -239,13 +216,11 @@ "arguments": [ "0x02" ], - "gasLimit": "15,000,000", - "gasPrice": "" + "gasLimit": "15,000,000" } }, { "step": "scCall", - "id": "", "tx": { "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -253,13 +228,11 @@ "arguments": [ "0x02" ], - "gasLimit": "15,000,000", - "gasPrice": "" + "gasLimit": "15,000,000" } }, { "step": "scCall", - "id": "", "tx": { "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", @@ -267,8 +240,7 @@ "arguments": [ "0x02" ], - "gasLimit": "15,000,000", - "gasPrice": "" + "gasLimit": "15,000,000" } } ] diff --git a/contracts/feature-tests/basic-features/scenarios/big_uint_pow.scen.json b/contracts/feature-tests/basic-features/scenarios/big_uint_pow.scen.json index 7a4ed72391..378068fe2e 100644 --- a/contracts/feature-tests/basic-features/scenarios/big_uint_pow.scen.json +++ b/contracts/feature-tests/basic-features/scenarios/big_uint_pow.scen.json @@ -8,14 +8,11 @@ "sc:basic-features": { "nonce": "0", "balance": "0", - "storage": {}, "code": "mxsc:../output/basic-features.mxsc.json" }, "address:an_account": { "nonce": "0", - "balance": "0", - "storage": {}, - "code": "" + "balance": "0" } } }, @@ -25,7 +22,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "pow_big_uint", "arguments": [ "10", diff --git a/contracts/feature-tests/basic-features/scenarios/small_num_overflow.scen.json b/contracts/feature-tests/basic-features/scenarios/small_num_overflow.scen.json index 2fc9de2183..d81ffc5306 100644 --- a/contracts/feature-tests/basic-features/scenarios/small_num_overflow.scen.json +++ b/contracts/feature-tests/basic-features/scenarios/small_num_overflow.scen.json @@ -8,14 +8,11 @@ "sc:basic-features": { "nonce": "0", "balance": "0", - "storage": {}, "code": "mxsc:../output/basic-features.mxsc.json" }, "address:an_account": { "nonce": "0", - "balance": "0", - "storage": {}, - "code": "" + "balance": "0" } } }, @@ -25,13 +22,13 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "no_overflow_u8", "arguments": [], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { + "out": [], "status": "4", "message": "str:panic occurred", "logs": "*", @@ -45,7 +42,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "overflow_u8", "arguments": [], "gasLimit": "50,000,000", @@ -67,13 +63,13 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "no_overflow_i8", "arguments": [], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { + "out": [], "status": "4", "message": "str:panic occurred", "logs": "*", @@ -87,7 +83,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "overflow_i8", "arguments": [], "gasLimit": "50,000,000", @@ -109,13 +104,13 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "no_overflow_u16", "arguments": [], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { + "out": [], "status": "4", "message": "str:panic occurred", "logs": "*", @@ -129,7 +124,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "overflow_u16", "arguments": [], "gasLimit": "50,000,000", @@ -151,13 +145,13 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "no_overflow_i16", "arguments": [], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { + "out": [], "status": "4", "message": "str:panic occurred", "logs": "*", @@ -171,7 +165,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "overflow_i16", "arguments": [], "gasLimit": "50,000,000", @@ -193,13 +186,13 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "no_overflow_u32", "arguments": [], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { + "out": [], "status": "4", "message": "str:panic occurred", "logs": "*", @@ -213,7 +206,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "overflow_u32", "arguments": [], "gasLimit": "50,000,000", @@ -235,13 +227,13 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "no_overflow_i32", "arguments": [], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { + "out": [], "status": "4", "message": "str:panic occurred", "logs": "*", @@ -255,7 +247,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "overflow_i32", "arguments": [], "gasLimit": "50,000,000", @@ -277,13 +268,13 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "no_overflow_u64", "arguments": [], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { + "out": [], "status": "4", "message": "str:panic occurred", "logs": "*", @@ -297,7 +288,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "overflow_u64", "arguments": [], "gasLimit": "50,000,000", @@ -319,13 +309,13 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "no_overflow_i64", "arguments": [], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { + "out": [], "status": "4", "message": "str:panic occurred", "logs": "*", @@ -339,7 +329,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "overflow_i64", "arguments": [], "gasLimit": "50,000,000", @@ -361,13 +350,13 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "no_overflow_usize", "arguments": [], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { + "out": [], "status": "4", "message": "str:panic occurred", "logs": "*", @@ -381,7 +370,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "overflow_usize", "arguments": [], "gasLimit": "50,000,000", @@ -403,13 +391,13 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "no_overflow_isize", "arguments": [], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { + "out": [], "status": "4", "message": "str:panic occurred", "logs": "*", @@ -423,7 +411,6 @@ "tx": { "from": "address:an_account", "to": "sc:basic-features", - "value": "0", "function": "overflow_isize", "arguments": [], "gasLimit": "50,000,000", diff --git a/contracts/feature-tests/basic-features/scenarios/storage_mapper_get_at_address.scen.json b/contracts/feature-tests/basic-features/scenarios/storage_mapper_get_at_address.scen.json index 4a1a0ea1e7..7577d8d5ba 100644 --- a/contracts/feature-tests/basic-features/scenarios/storage_mapper_get_at_address.scen.json +++ b/contracts/feature-tests/basic-features/scenarios/storage_mapper_get_at_address.scen.json @@ -154,4 +154,4 @@ } } ] -} \ No newline at end of file +} diff --git a/contracts/feature-tests/composability/scenarios/promises_single_transfer.scen.json b/contracts/feature-tests/composability/scenarios/promises_single_transfer.scen.json index 642dfb3ff9..d1132485c4 100644 --- a/contracts/feature-tests/composability/scenarios/promises_single_transfer.scen.json +++ b/contracts/feature-tests/composability/scenarios/promises_single_transfer.scen.json @@ -93,7 +93,7 @@ { "address": "sc:promises", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -107,7 +107,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:promises" ], @@ -188,7 +188,7 @@ { "address": "sc:promises", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -202,7 +202,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:promises" ], From c3a69fdf4d365b7a1264157e19797e1a8f07c2ec Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Mon, 29 Jan 2024 09:45:41 +0200 Subject: [PATCH 5/5] get_code_metadata additional test --- .../scenarios/get_code_metadata.scen.json | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/contracts/feature-tests/basic-features/scenarios/get_code_metadata.scen.json b/contracts/feature-tests/basic-features/scenarios/get_code_metadata.scen.json index 832caa8950..fdd4d68cb1 100644 --- a/contracts/feature-tests/basic-features/scenarios/get_code_metadata.scen.json +++ b/contracts/feature-tests/basic-features/scenarios/get_code_metadata.scen.json @@ -9,6 +9,12 @@ "code": "mxsc:../output/basic-features.mxsc.json", "codeMetadata": "0x0104" }, + "sc:basic-features-2": { + "nonce": "0", + "balance": "0", + "code": "mxsc:../output/basic-features.mxsc.json", + "codeMetadata": "0x0100" + }, "address:an_account": { "nonce": "0", "balance": "0" @@ -38,6 +44,29 @@ "refund": "*" } }, + { + "step": "scCall", + "id": "get_code_metadata-2", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "get_code_metadata", + "arguments": [ + "sc:basic-features-2" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "0x0100" + ], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, { "step": "scCall", "id": "get_code_metadata-missing-address",