From a37fff1b7f7d6a6adfa50b38abc871b8d6b3e1a2 Mon Sep 17 00:00:00 2001 From: Trubnikov Sergey Date: Thu, 15 Dec 2022 06:24:05 +0000 Subject: [PATCH] misk: small fix and some docks --- --- a/crates/evm-coder/tests/abi_derive_generation.rs +++ b/crates/evm-coder/tests/abi_derive_generation.rs @@ -740,7 +740,7 @@ /// Some docs /// At multi /// line - #[derive(AbiCoder, Debug, PartialEq, Default)] + #[derive(AbiCoder, Debug, PartialEq, Default, Clone, Copy)] #[repr(u8)] enum Color { /// Docs for Red --- a/pallets/nonfungible/src/erc.rs +++ b/pallets/nonfungible/src/erc.rs @@ -140,18 +140,18 @@ .map_err(dispatch_to_evm::) } + /// @notice Get permissions for token properties. fn token_property_permissions( &self, ) -> Result)>> { let mut res = >::new(); for (key, pp) in >::token_property_permission(self.id) { let key = string::from_utf8(key.into_inner()).unwrap(); - let pp = [ + let pp = vec![ (EthTokenPermissions::Mutable, pp.mutable), (EthTokenPermissions::TokenOwner, pp.token_owner), (EthTokenPermissions::CollectionAdmin, pp.collection_admin), - ] - .into(); + ]; res.push((key, pp)); } Ok(res) --- a/pallets/refungible/src/erc.rs +++ b/pallets/refungible/src/erc.rs @@ -143,6 +143,7 @@ .map_err(dispatch_to_evm::) } + /// @notice Get permissions for token properties. fn token_property_permissions( &self, ) -> Result)>> { --- a/tests/src/eth/tokenProperties.test.ts +++ b/tests/src/eth/tokenProperties.test.ts @@ -33,6 +33,7 @@ }); itEth('Can be reconfigured', async({helper}) => { + const owner = await helper.eth.createAccountWithBalance(donor); const caller = await helper.eth.createAccountWithBalance(donor); for(const [mutable,collectionAdmin, tokenOwner] of cartesian([], [false, true], [false, true], [false, true])) { const collection = await helper.nft.mintCollection(alice); -- gitstuff