Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/chain-config into feat/beta #219

Merged
merged 38 commits into from
Jan 9, 2025
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
241c99c
Added new structs for Sovereign Chain Config
andreiblt1304 Dec 13, 2024
42c8e60
Updated `init` and `update` endpoints to use new struct and storage
andreiblt1304 Dec 13, 2024
50d668b
Removed any use of the `StakeMultiArg`
andreiblt1304 Dec 13, 2024
cd3b254
Clippy fix
andreiblt1304 Dec 13, 2024
d86f2d2
Chain-Config tests
andreiblt1304 Dec 19, 2024
e10eb27
Updated root `Cargo.lock`
andreiblt1304 Dec 19, 2024
4f2aeeb
Modified logic for config update
andreiblt1304 Dec 19, 2024
195f96b
Added ownership change transaction
andreiblt1304 Dec 19, 2024
2baa979
Whiteline
andreiblt1304 Dec 19, 2024
ce60191
Build + proxy
andreiblt1304 Dec 19, 2024
f2965ee
Merge branch 'config-update' into config-tests
andreiblt1304 Dec 19, 2024
1518ac2
Added `new()` function for `SovereignConfig`
andreiblt1304 Dec 19, 2024
31d75ab
Update chain-factory endpoint to use new struct
andreiblt1304 Dec 19, 2024
c1609c1
Merge branch 'config-update' into config-tests
andreiblt1304 Dec 19, 2024
2e722c1
Update unit test + build
andreiblt1304 Dec 19, 2024
866dac5
Fixed tests
andreiblt1304 Dec 19, 2024
0f718c3
Removed unused argument
andreiblt1304 Dec 19, 2024
257e3a6
Merge branch 'config-update' into config-tests
andreiblt1304 Dec 19, 2024
b47d69c
Build contracts + proxy
andreiblt1304 Dec 19, 2024
82ae7d5
Added endpoint annotation
andreiblt1304 Dec 19, 2024
245ce77
Merge branch 'config-update' into config-tests
andreiblt1304 Dec 19, 2024
382a7a7
Added `update_config` test
andreiblt1304 Dec 19, 2024
6e72794
Updated `init` and `update_config` logic
andreiblt1304 Dec 19, 2024
b5d977f
Removed unused import
andreiblt1304 Dec 19, 2024
16dbfb9
Added validators array unit test
andreiblt1304 Dec 19, 2024
5ac0490
Clippy fixes
andreiblt1304 Dec 19, 2024
de2c412
Removed comment
andreiblt1304 Dec 19, 2024
0fe84cf
Added `update_config` test
andreiblt1304 Dec 20, 2024
1e48365
Build + updated call to UserBuiltinProxy
andreiblt1304 Dec 20, 2024
76459ae
Removed unused imports
andreiblt1304 Dec 20, 2024
a338345
Updated config set logic
andreiblt1304 Dec 23, 2024
85d3429
Merge pull request #212 from multiversx/beta-merge-in-chain-config
andreiblt1304 Dec 27, 2024
051ae2c
Merge branch 'feat/chain-config' into config-update
andreiblt1304 Dec 27, 2024
a27ace6
Fixes after review
andreiblt1304 Jan 8, 2025
3d334f6
Added use `default_config` function
andreiblt1304 Jan 9, 2025
5b3ebc5
Merge pull request #208 from multiversx/config-update
andreiblt1304 Jan 9, 2025
04bd1d4
Merge branch 'feat/beta' into beta-in-chain-config
andreiblt1304 Jan 9, 2025
cdfc14b
Merge pull request #218 from multiversx/beta-in-chain-config
andreiblt1304 Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions chain-config/tests/chain_config_unit_tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use multiversx_sc::types::{BigUint, MultiValueEncoded, TestAddress, TestSCAddress};
use multiversx_sc_scenario::{api::StaticApi, imports::MxscPath, ScenarioTxRun, ScenarioWorld};
use proxies::chain_config_proxy::ChainConfigContractProxy;
use transaction::StakeArgs;
use transaction::{SovereignConfig, StakeArgs};

const CONFIG_ADDRESS: TestSCAddress = TestSCAddress::new("config-address");
const CONFIG_CODE_PATH: MxscPath = MxscPath::new("output/chain-config.mxsc.json");
@@ -30,25 +30,12 @@ impl ChainConfigTestState {
Self { world }
}

fn deploy_chain_config(
&mut self,
min_validators: u64,
max_validators: u64,
min_stake: BigUint<StaticApi>,
admin: TestAddress,
additional_stake_required: MultiValueEncoded<StaticApi, StakeArgs<StaticApi>>,
) {
fn deploy_chain_config(&mut self, config: SovereignConfig<StaticApi>, admin: TestAddress) {
self.world
.tx()
.from(OWNER)
.typed(ChainConfigContractProxy)
.init(
min_validators,
max_validators,
min_stake,
admin,
additional_stake_required,
)
.init(config, admin)
.code(CONFIG_CODE_PATH)
.new_address(CONFIG_ADDRESS)
.run();
@@ -59,5 +46,6 @@ impl ChainConfigTestState {
fn deploy_chain_config() {
let mut state = ChainConfigTestState::new();

state.deploy_chain_config(0, 1, BigUint::default(), OWNER, MultiValueEncoded::new());
let config = SovereignConfig::new(0, 1, BigUint::default(), None);
state.deploy_chain_config(config, OWNER);
}
3 changes: 2 additions & 1 deletion enshrine-esdt-safe/wasm-enshrine-esdt-safe-full/Cargo.lock

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

3 changes: 2 additions & 1 deletion enshrine-esdt-safe/wasm-enshrine-esdt-safe-view/Cargo.lock

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

3 changes: 2 additions & 1 deletion enshrine-esdt-safe/wasm/Cargo.lock

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

3 changes: 2 additions & 1 deletion token-handler/wasm-token-handler-full/Cargo.lock

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

3 changes: 2 additions & 1 deletion token-handler/wasm-token-handler-view/Cargo.lock

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

3 changes: 2 additions & 1 deletion token-handler/wasm/Cargo.lock

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