difftreelog
misk: small fix and some docks
in: master
4 files changed
crates/evm-coder/tests/abi_derive_generation.rsdiffbeforeafterboth740 /// Some docs740 /// Some docs741 /// At multi741 /// At multi742 /// line742 /// line743 #[derive(AbiCoder, Debug, PartialEq, Default)]743 #[derive(AbiCoder, Debug, PartialEq, Default, Clone, Copy)]744 #[repr(u8)]744 #[repr(u8)]745 enum Color {745 enum Color {746 /// Docs for Red746 /// Docs for Redpallets/nonfungible/src/erc.rsdiffbeforeafterboth140 .map_err(dispatch_to_evm::<T>)140 .map_err(dispatch_to_evm::<T>)141 }141 }142142143 /// @notice Get permissions for token properties.143 fn token_property_permissions(144 fn token_property_permissions(144 &self,145 &self,145 ) -> Result<Vec<(string, Vec<(EthTokenPermissions, bool)>)>> {146 ) -> Result<Vec<(string, Vec<(EthTokenPermissions, bool)>)>> {146 let mut res = <Vec<_>>::new();147 let mut res = <Vec<_>>::new();147 for (key, pp) in <Pallet<T>>::token_property_permission(self.id) {148 for (key, pp) in <Pallet<T>>::token_property_permission(self.id) {148 let key = string::from_utf8(key.into_inner()).unwrap();149 let key = string::from_utf8(key.into_inner()).unwrap();149 let pp = [150 let pp = vec![150 (EthTokenPermissions::Mutable, pp.mutable),151 (EthTokenPermissions::Mutable, pp.mutable),151 (EthTokenPermissions::TokenOwner, pp.token_owner),152 (EthTokenPermissions::TokenOwner, pp.token_owner),152 (EthTokenPermissions::CollectionAdmin, pp.collection_admin),153 (EthTokenPermissions::CollectionAdmin, pp.collection_admin),153 ]154 ];154 .into();155 res.push((key, pp));155 res.push((key, pp));156 }156 }157 Ok(res)157 Ok(res)pallets/refungible/src/erc.rsdiffbeforeafterboth143 .map_err(dispatch_to_evm::<T>)143 .map_err(dispatch_to_evm::<T>)144 }144 }145145146 /// @notice Get permissions for token properties.146 fn token_property_permissions(147 fn token_property_permissions(147 &self,148 &self,148 ) -> Result<Vec<(string, Vec<(EthTokenPermissions, bool)>)>> {149 ) -> Result<Vec<(string, Vec<(EthTokenPermissions, bool)>)>> {tests/src/eth/tokenProperties.test.tsdiffbeforeafterboth33 });33 });343435 itEth('Can be reconfigured', async({helper}) => {35 itEth('Can be reconfigured', async({helper}) => {36 const owner = await helper.eth.createAccountWithBalance(donor);36 const caller = await helper.eth.createAccountWithBalance(donor);37 const caller = await helper.eth.createAccountWithBalance(donor);37 for(const [mutable,collectionAdmin, tokenOwner] of cartesian([], [false, true], [false, true], [false, true])) {38 for(const [mutable,collectionAdmin, tokenOwner] of cartesian([], [false, true], [false, true], [false, true])) {38 const collection = await helper.nft.mintCollection(alice);39 const collection = await helper.nft.mintCollection(alice);