diff --git a/configs/swarm/executor.wasm b/configs/swarm/executor.wasm index ac9b6927e88..4c4c8b26ecf 100644 Binary files a/configs/swarm/executor.wasm and b/configs/swarm/executor.wasm differ diff --git a/data_model/src/asset.rs b/data_model/src/asset.rs index 82366bb21b0..c3ef6cff67c 100644 --- a/data_model/src/asset.rs +++ b/data_model/src/asset.rs @@ -124,6 +124,7 @@ mod model { #[getset(get_copy = "pub")] pub value_type: AssetValueType, /// Is the asset mintable + #[getset(get_copy = "pub")] pub mintable: Mintable, /// IPFS link to the [`AssetDefinition`] logo #[getset(get = "pub")] diff --git a/data_model/src/events/data/events.rs b/data_model/src/events/data/events.rs index 58fdbae2b32..5222a3f311e 100644 --- a/data_model/src/events/data/events.rs +++ b/data_model/src/events/data/events.rs @@ -7,6 +7,7 @@ use iroha_primitives::numeric::Numeric; pub use self::model::*; use super::*; +use crate::metadata::MetadataValueBox; macro_rules! data_event { ($item:item) => { @@ -38,7 +39,6 @@ macro_rules! data_event { #[model] mod model { use super::*; - use crate::metadata::MetadataValueBox; /// Generic [`MetadataChanged`] struct. /// Contains the changed metadata (`(key, value)` pair), either inserted or removed, which is determined by the wrapping event. @@ -58,8 +58,8 @@ mod model { // TODO: Generics are not supported. Figure out what to do //#[getset(get = "pub")] #[ffi_type] - pub struct MetadataChanged { - pub target_id: ID, + pub struct MetadataChanged { + pub target_id: Id, pub key: Name, pub value: MetadataValueBox, } @@ -606,6 +606,23 @@ impl DataEvent { } } +impl MetadataChanged { + /// Getter for `target_id` + pub fn target_id(&self) -> &Id { + &self.target_id + } + + /// Getter for `target_id` + pub fn key(&self) -> &Name { + &self.key + } + + /// Getter for `value` + pub fn value(&self) -> &MetadataValueBox { + &self.value + } +} + pub mod prelude { pub use super::{ account::{AccountEvent, AccountEventSet, AccountPermissionChanged, AccountRoleChanged}, diff --git a/data_model/src/events/time.rs b/data_model/src/events/time.rs index 7a0ef12534a..46bd80e5bc8 100644 --- a/data_model/src/events/time.rs +++ b/data_model/src/events/time.rs @@ -264,6 +264,18 @@ impl Schedule { } } +impl TimeInterval { + /// Getter for `since` + pub fn since(&self) -> &Duration { + &self.since + } + + /// Getter for `length` + pub fn length(&self) -> &Duration { + &self.length + } +} + impl From for Range { #[inline] fn from(interval: TimeInterval) -> Self { diff --git a/data_model/src/peer.rs b/data_model/src/peer.rs index a158aa87f63..ffacb39dd98 100644 --- a/data_model/src/peer.rs +++ b/data_model/src/peer.rs @@ -36,7 +36,6 @@ mod model { #[ffi_type] pub struct PeerId { /// Address of the [`Peer`]'s entrypoint. - // TODO: Derive with getset once FFI impl is fixed pub address: SocketAddr, /// Public Key of the [`Peer`]. pub public_key: PublicKey,