Skip to content

Commit

Permalink
Usage of the crate includes defined there events
Browse files Browse the repository at this point in the history
  • Loading branch information
xgreenx committed Jul 13, 2023
1 parent dd8d861 commit 28b6b0b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions integration-tests/events/event-def-unused/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#![cfg_attr(not(feature = "std"), no_std, no_main)]

#[ink::trait_definition]
pub trait FlipperTrait {
#[ink(message)]
fn flip(&mut self);
}

#[ink::event]
pub struct EventDefUnused {
#[ink(topic)]
Expand Down
7 changes: 7 additions & 0 deletions integration-tests/events/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ pub mod events {
}
}

impl event_def_unused::FlipperTrait for Events {
#[ink(message)]
fn flip(&mut self) {
self.value = !self.value;
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 28b6b0b

Please sign in to comment.