Skip to content

Commit d844358

Browse files
Remove MAX_EVENT_TOPICS from Environment implementations (#2122)
* Remove `MAX_EVENT_TOPICS` from `Environment` implementations * Update changelog * Update `Cargo.lock`
1 parent e5ed2e3 commit d844358

File tree

4 files changed

+13
-19
lines changed

4 files changed

+13
-19
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Removed
1515
- Removed chain extension functionality ‒ [2120](https://github.com/use-ink/cargo-contract/pull/2120)
16+
- Remove `MAX_EVENT_TOPICS` from `Environment` implementations - [#2122](https://github.com/use-ink/cargo-contract/pull/2122)
1617

1718
## [6.0.0-alpha.1]
1819

Cargo.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/cargo-contract/src/cmd/config.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ impl Config for Ecdsachain {
5959
}
6060

6161
impl Environment for Ecdsachain {
62-
const MAX_EVENT_TOPICS: usize = <DefaultEnvironment as Environment>::MAX_EVENT_TOPICS;
6362
const NATIVE_TO_ETH_RATIO: u32 =
6463
<DefaultEnvironment as Environment>::NATIVE_TO_ETH_RATIO;
6564
type AccountId = <DefaultEnvironment as Environment>::AccountId;
@@ -93,7 +92,6 @@ impl Config for Substrate {
9392
}
9493

9594
impl Environment for Substrate {
96-
const MAX_EVENT_TOPICS: usize = <DefaultEnvironment as Environment>::MAX_EVENT_TOPICS;
9795
const NATIVE_TO_ETH_RATIO: u32 =
9896
<DefaultEnvironment as Environment>::NATIVE_TO_ETH_RATIO;
9997
type AccountId = <DefaultEnvironment as Environment>::AccountId;
@@ -124,7 +122,6 @@ impl Config for Polkadot {
124122
}
125123

126124
impl Environment for Polkadot {
127-
const MAX_EVENT_TOPICS: usize = <DefaultEnvironment as Environment>::MAX_EVENT_TOPICS;
128125
const NATIVE_TO_ETH_RATIO: u32 =
129126
<DefaultEnvironment as Environment>::NATIVE_TO_ETH_RATIO;
130127
type AccountId = <DefaultEnvironment as Environment>::AccountId;

crates/extrinsics/src/env_check.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use anyhow::{
1919
/*
2020
// todo missing comparison for those. not sure if even exposed somewhere.
2121
impl Environment for DefaultEnvironment {
22-
const MAX_EVENT_TOPICS: usize = 4;
2322
}
2423
*/
2524
fn get_node_env_fields(
@@ -470,8 +469,6 @@ mod tests {
470469
// let _ = generate_metadata();
471470
let leaf = LeafLayout::from_key::<u8>(LayoutKey::new(0_u8));
472471
let layout = Layout::Leaf(leaf);
473-
474-
const MAX_EVENT_TOPICS: usize = 4;
475472
const NATIVE_TO_ETH_RATIO: u32 = 100_000_000;
476473
const BUFFER_SIZE: usize = 1 << 14;
477474

@@ -530,7 +527,6 @@ mod tests {
530527
::core::convert::AsRef::as_ref,
531528
),
532529
))
533-
.max_event_topics(MAX_EVENT_TOPICS)
534530
.native_to_eth_ratio(NATIVE_TO_ETH_RATIO)
535531
.static_buffer_size(BUFFER_SIZE)
536532
.done(),

0 commit comments

Comments
 (0)