git.delta.rocks / unique-network / refs/commits / cd0ba0dd6b59

difftreelog

Apply suggestions from code review

Gregory Simonov2022-12-06parent: #01e5c45.patch.diff
in: master

3 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
472 u128,472 u128,
473 ),473 ),
474474
475 /// Amount pieces of token owned by `sender` was approved for `spender`.475 /// A `sender` approves operations on all owned tokens for `spender`.
476 ApprovedForAll(476 ApprovedForAll(
477 /// Id of collection to which item is belong.477 /// Id of collection to which item is belong.
478 CollectionId,478 CollectionId,
479 /// Owner of a wallet.479 /// Owner of a wallet.
480 T::CrossAccountId,480 T::CrossAccountId,
481 /// Id for which operator status was granted or rewoked.481 /// Id for which operator status was granted or rewoked.
482 T::CrossAccountId,482 T::CrossAccountId,
483 /// Is operator status was granted or rewoked.483 /// Is operator status granted or revoked?
484 bool,484 bool,
485 ),485 ),
486486
1847 /// An operator is allowed to transfer all tokens of the sender on their behalf.1847 /// An operator is allowed to transfer all tokens of the sender on their behalf.
1848 /// * `owner` - Token owner1848 /// * `owner` - Token owner
1849 /// * `operator` - Operator1849 /// * `operator` - Operator
1850 /// * `approve` - Is operator enabled or disabled1850 /// * `approve` - Should operator status be granted or revoked?
1851 fn set_approval_for_all(1851 fn set_approval_for_all(
1852 &self,1852 &self,
1853 owner: T::CrossAccountId,1853 owner: T::CrossAccountId,
1854 operator: T::CrossAccountId,1854 operator: T::CrossAccountId,
1855 approve: bool,1855 approve: bool,
1856 ) -> DispatchResultWithPostInfo;1856 ) -> DispatchResultWithPostInfo;
18571857
1858 /// Tells whether an operator is approved by a given owner.1858 /// Tells whether the given `owner` approves the `operator`.
1859 fn is_approved_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool;1859 fn is_approved_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool;
1860}1860}
18611861
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
470 }470 }
471471
472 /// @notice Sets or unsets the approval of a given operator.472 /// @notice Sets or unsets the approval of a given operator.
473 /// An operator is allowed to transfer all tokens of the sender on their behalf.473 /// The `operator` is allowed to transfer all tokens of the `caller` on their behalf.
474 /// @param operator Operator474 /// @param operator Operator
475 /// @param approved Is operator enabled or disabled475 /// @param approved Is operator enabled or disabled
476 #[weight(<SelfWeightOf<T>>::set_approval_for_all())]476 #[weight(<SelfWeightOf<T>>::set_approval_for_all())]
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
281 Key<Blake2_128Concat, T::CrossAccountId>,281 Key<Blake2_128Concat, T::CrossAccountId>,
282 ),282 ),
283 Value = bool,283 Value = bool,
284 QueryKind = OptionQuery,284 QueryKind = ValueQuery,
285 >;285 >;
286286
287 /// Upgrade from the old schema to properties.287 /// Upgrade from the old schema to properties.