Create interfaces to allow external access to the values inside the Allocation.
EthanShang8989 opened this issue · comments
EthanShang8989 commented
I am filtering Allocation inside rgb21 from inside contractIface.data.state. tried to extract the data inside but found it to be private.
Suggest to expose the interface.
pub struct Allocation(TokenIndex, OwnedFraction);
impl Allocation {
pub fn with(index: TokenIndex, fraction: OwnedFraction) -> Allocation {
Allocation(index, fraction)
}
pub fn token_id(self) -> TokenIndex { self.0 }
pub fn fraction(self) -> OwnedFraction { self.1 }
}
Armando CD commented
Done in #127
Dr. Maxim Orlovsky commented
Closing since the fixing PR is already merged