difftreelog
refactor remove `#[transactional]` from extrinsics
in: master
Every extrinsic now runs in transaction implicitly, and `#[transactional]` on pallet dispatchable is now meaningless
4 files changed
pallets/evm-migration/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-migration/src/lib.rs
+++ b/pallets/evm-migration/src/lib.rs
@@ -23,7 +23,7 @@
#[frame_support::pallet]
pub mod pallet {
- use frame_support::{pallet_prelude::*, transactional};
+ use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use sp_core::{H160, H256};
use sp_std::vec::Vec;
@@ -84,7 +84,6 @@
}
#[pallet::weight(<SelfWeightOf<T>>::finish(code.len() as u32))]
- #[transactional]
pub fn finish(origin: OriginFor<T>, address: H160, code: Vec<u8>) -> DispatchResult {
ensure_root(origin)?;
ensure!(
pallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/lib.rs
+++ b/pallets/proxy-rmrk-core/src/lib.rs
@@ -145,7 +145,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
-use frame_support::{pallet_prelude::*, transactional, BoundedVec, dispatch::DispatchResult};
+use frame_support::{pallet_prelude::*, BoundedVec, dispatch::DispatchResult};
use frame_system::{pallet_prelude::*, ensure_signed};
use sp_runtime::{DispatchError, Permill, traits::StaticLookup};
use sp_std::{
@@ -350,11 +350,11 @@
/// * Anyone - will be assigned as the issuer of the collection.
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `metadata`: Metadata describing the collection, e.g. IPFS hash. Cannot be changed.
/// - `max`: Optional maximum number of tokens.
/// - `symbol`: UTF-8 string with token prefix, by which to represent the token in wallets and UIs.
/// Analogous to Unique's [`token_prefix`](up_data_structs::Collection). Cannot be changed.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::create_collection())]
pub fn create_collection(
origin: OriginFor<T>,
@@ -426,8 +426,8 @@
/// * Collection issuer
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `collection_id`: RMRK ID of the collection to destroy.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::destroy_collection())]
pub fn destroy_collection(
origin: OriginFor<T>,
@@ -459,9 +459,9 @@
/// * Collection issuer
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `collection_id`: RMRK collection ID to change the issuer of.
/// - `new_issuer`: Collection's new issuer.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::change_collection_issuer())]
pub fn change_collection_issuer(
origin: OriginFor<T>,
@@ -497,8 +497,8 @@
/// * Collection issuer
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `collection_id`: RMRK ID of the collection to lock.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::lock_collection())]
pub fn lock_collection(
origin: OriginFor<T>,
@@ -535,6 +535,7 @@
/// * Collection issuer
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `owner`: Owner account of the NFT. If set to None, defaults to the sender (collection issuer).
/// - `collection_id`: RMRK collection ID for the NFT to be minted within. Cannot be changed.
/// - `recipient`: Receiver account of the royalty. Has no effect if the `royalty_amount` is not set. Cannot be changed.
@@ -542,7 +543,6 @@
/// - `metadata`: Arbitrary data about an NFT, e.g. IPFS hash. Cannot be changed.
/// - `transferable`: Can this NFT be transferred? Cannot be changed.
/// - `resources`: Resource data to be added to the NFT immediately after minting.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::mint_nft(resources.as_ref().map(|r| r.len() as u32).unwrap_or(0)))]
pub fn mint_nft(
origin: OriginFor<T>,
@@ -620,12 +620,12 @@
/// * Token owner
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `collection_id`: RMRK ID of the collection in which the NFT to burn belongs to.
/// - `nft_id`: ID of the NFT to be destroyed.
/// - `max_burns`: Maximum number of tokens to burn, assuming nesting. The transaction
/// is reverted if there are more tokens to burn in the nesting tree than this number.
/// This is primarily a mechanism of transaction weight control.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::burn_nft(*max_burns))]
pub fn burn_nft(
origin: OriginFor<T>,
@@ -669,10 +669,10 @@
/// - Token owner
///
/// # Arguments:
- /// - `collection_id`: RMRK ID of the collection of the NFT to be transferred.
- /// - `nft_id`: ID of the NFT to be transferred.
+ /// - `origin`: sender of the transaction
+ /// - `rmrk_collection_id`: RMRK ID of the collection of the NFT to be transferred.
+ /// - `rmrk_nft_id`: ID of the NFT to be transferred.
/// - `new_owner`: New owner of the nft which can be either an account or a NFT.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::send())]
pub fn send(
origin: OriginFor<T>,
@@ -793,11 +793,11 @@
/// - Token-owner-to-be
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `rmrk_collection_id`: RMRK collection ID of the NFT to be accepted.
/// - `rmrk_nft_id`: ID of the NFT to be accepted.
/// - `new_owner`: Either the sender's account ID or a sender-owned NFT,
/// whichever the accepted NFT was sent to.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::accept_nft())]
pub fn accept_nft(
origin: OriginFor<T>,
@@ -885,9 +885,9 @@
/// - Token-owner-to-be-not
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `rmrk_collection_id`: RMRK ID of the NFT to be rejected.
/// - `rmrk_nft_id`: ID of the NFT to be rejected.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::reject_nft())]
pub fn reject_nft(
origin: OriginFor<T>,
@@ -950,10 +950,11 @@
/// - Token owner
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `rmrk_collection_id`: RMRK collection ID of the NFT.
/// - `rmrk_nft_id`: ID of the NFT with a pending resource to be accepted.
/// - `resource_id`: ID of the newly created pending resource.
- #[transactional]
+ /// accept the addition of a new resource to an existing NFT
#[pallet::weight(<SelfWeightOf<T>>::accept_resource())]
pub fn accept_resource(
origin: OriginFor<T>,
@@ -1004,10 +1005,10 @@
/// - Token owner
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `rmrk_collection_id`: RMRK collection ID of the NFT.
/// - `rmrk_nft_id`: ID of the NFT with a resource to be removed.
/// - `resource_id`: ID of the removal-pending resource.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::accept_resource_removal())]
pub fn accept_resource_removal(
origin: OriginFor<T>,
@@ -1084,11 +1085,11 @@
/// - Token owner - in case of NFT property
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `rmrk_collection_id`: RMRK collection ID.
/// - `maybe_nft_id`: Optional ID of the NFT. If left empty, then the property is set for the collection.
/// - `key`: Key of the custom property to be referenced by.
/// - `value`: Value of the custom property to be stored.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::set_property())]
pub fn set_property(
origin: OriginFor<T>,
@@ -1158,10 +1159,10 @@
/// - Token owner
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `rmrk_collection_id`: RMRK collection ID of the NFT.
/// - `rmrk_nft_id`: ID of the NFT to rearrange resource priorities for.
/// - `priorities`: Ordered vector of resource IDs.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::set_priority())]
pub fn set_priority(
origin: OriginFor<T>,
@@ -1209,10 +1210,10 @@
/// the owner's [acceptance](Pallet::accept_resource).
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `rmrk_collection_id`: RMRK collection ID of the NFT.
/// - `nft_id`: ID of the NFT to assign a resource to.
/// - `resource`: Data of the resource to be created.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::add_basic_resource())]
pub fn add_basic_resource(
origin: OriginFor<T>,
@@ -1251,10 +1252,10 @@
/// the owner's [acceptance](Pallet::accept_resource).
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `rmrk_collection_id`: RMRK collection ID of the NFT.
/// - `nft_id`: ID of the NFT to assign a resource to.
/// - `resource`: Data of the resource to be created.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::add_composable_resource())]
pub fn add_composable_resource(
origin: OriginFor<T>,
@@ -1313,10 +1314,10 @@
/// the owner's [acceptance](Pallet::accept_resource).
///
/// # Arguments:
+ /// - `origin`: sender of the transaction
/// - `rmrk_collection_id`: RMRK collection ID of the NFT.
/// - `nft_id`: ID of the NFT to assign a resource to.
/// - `resource`: Data of the resource to be created.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::add_slot_resource())]
pub fn add_slot_resource(
origin: OriginFor<T>,
@@ -1354,10 +1355,10 @@
/// - Collection issuer
///
/// # Arguments
- /// - `collection_id`: RMRK ID of a collection to which the NFT making use of the resource belongs to.
+ /// - `origin`: sender of the transaction
+ /// - `rmrk_collection_id`: RMRK ID of a collection to which the NFT making use of the resource belongs to.
/// - `nft_id`: ID of the NFT with a resource to be removed.
/// - `resource_id`: ID of the resource to be removed.
- #[transactional]
#[pallet::weight(<SelfWeightOf<T>>::remove_resource())]
pub fn remove_resource(
origin: OriginFor<T>,
pallets/proxy-rmrk-equip/src/lib.rsdiffbeforeafterboth133133134#![cfg_attr(not(feature = "std"), no_std)]134#![cfg_attr(not(feature = "std"), no_std)]135135136use frame_support::{pallet_prelude::*, transactional, BoundedVec, dispatch::DispatchResult};136use frame_support::{pallet_prelude::*, BoundedVec, dispatch::DispatchResult};137use frame_system::{pallet_prelude::*, ensure_signed};137use frame_system::{pallet_prelude::*, ensure_signed};138use sp_runtime::DispatchError;138use sp_runtime::DispatchError;139use up_data_structs::*;139use up_data_structs::*;226 /// - Anyone - will be assigned as the issuer of the Base.226 /// - Anyone - will be assigned as the issuer of the Base.227 ///227 ///228 /// # Arguments:228 /// # Arguments:229 /// - `origin`: Caller, will be assigned as the issuer of the Base229 /// - `base_type`: Arbitrary media type, e.g. "svg".230 /// - `base_type`: Arbitrary media type, e.g. "svg".230 /// - `symbol`: Arbitrary client-chosen symbol.231 /// - `symbol`: Arbitrary client-chosen symbol.231 /// - `parts`: Array of Fixed and Slot Parts composing the Base,232 /// - `parts`: Array of Fixed and Slot Parts composing the Base,232 /// confined in length by [`RmrkPartsLimit`](up_data_structs::RmrkPartsLimit).233 /// confined in length by [`RmrkPartsLimit`](up_data_structs::RmrkPartsLimit).233 #[transactional]234 #[pallet::weight(<SelfWeightOf<T>>::create_base(parts.len() as u32))]234 #[pallet::weight(<SelfWeightOf<T>>::create_base(parts.len() as u32))]235 pub fn create_base(235 pub fn create_base(236 origin: OriginFor<T>,236 origin: OriginFor<T>,295 /// - Base issuer295 /// - Base issuer296 ///296 ///297 /// # Arguments:297 /// # Arguments:298 /// - `origin`: sender of the transaction298 /// - `base_id`: Base ID containing the Theme to be updated.299 /// - `base_id`: Base ID containing the Theme to be updated.299 /// - `theme`: Theme to add to the Base. A Theme has a name and properties, which are an300 /// - `theme`: Theme to add to the Base. A Theme has a name and properties, which are an300 /// array of [key, value, inherit].301 /// array of [key, value, inherit].301 /// - `key`: Arbitrary BoundedString, defined by client.302 /// - `key`: Arbitrary BoundedString, defined by client.302 /// - `value`: Arbitrary BoundedString, defined by client.303 /// - `value`: Arbitrary BoundedString, defined by client.303 /// - `inherit`: Optional bool.304 /// - `inherit`: Optional bool.304 #[transactional]305 #[pallet::weight(<SelfWeightOf<T>>::theme_add(theme.properties.len() as u32))]305 #[pallet::weight(<SelfWeightOf<T>>::theme_add(theme.properties.len() as u32))]306 pub fn theme_add(306 pub fn theme_add(307 origin: OriginFor<T>,307 origin: OriginFor<T>,359 /// - Base issuer359 /// - Base issuer360 ///360 ///361 /// # Arguments:361 /// # Arguments:362 /// - `origin`: sender of the transaction362 /// - `base_id`: Base containing the Slot Part to be updated.363 /// - `base_id`: Base containing the Slot Part to be updated.363 /// - `part_id`: Slot Part whose Equippable List is being updated.364 /// - `slot_id`: Slot Part whose Equippable List is being updated .364 /// - `equippables`: List of equippables that will override the current Equippables list.365 /// - `equippables`: List of equippables that will override the current Equippables list.365 #[transactional]366 #[pallet::weight(<SelfWeightOf<T>>::equippable())]366 #[pallet::weight(<SelfWeightOf<T>>::equippable())]367 pub fn equippable(367 pub fn equippable(368 origin: OriginFor<T>,368 origin: OriginFor<T>,pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -78,7 +78,6 @@
dispatch::DispatchResult,
ensure, fail,
weights::{Weight},
- transactional,
pallet_prelude::{DispatchResultWithPostInfo, ConstU32},
BoundedVec,
};
@@ -311,7 +310,6 @@
/// * `mode`: Type of items stored in the collection and type dependent data.
// returns collection ID
#[weight = <SelfWeightOf<T>>::create_collection()]
- #[transactional]
#[deprecated(note = "`create_collection_ex` is more up-to-date and advanced, prefer it instead")]
pub fn create_collection(
origin,
@@ -342,7 +340,6 @@
///
/// * `data`: Explicit data of a collection used for its creation.
#[weight = <SelfWeightOf<T>>::create_collection()]
- #[transactional]
pub fn create_collection_ex(origin, data: CreateCollectionData<T::AccountId>) -> DispatchResult {
let sender = ensure_signed(origin)?;
@@ -363,7 +360,6 @@
///
/// * `collection_id`: Collection to destroy.
#[weight = <SelfWeightOf<T>>::destroy_collection()]
- #[transactional]
pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let collection = <CollectionHandle<T>>::try_get(collection_id)?;
@@ -399,7 +395,6 @@
/// * `collection_id`: ID of the modified collection.
/// * `address`: ID of the address to be added to the allowlist.
#[weight = <SelfWeightOf<T>>::add_to_allow_list()]
- #[transactional]
pub fn add_to_allow_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
@@ -433,7 +428,6 @@
/// * `collection_id`: ID of the modified collection.
/// * `address`: ID of the address to be removed from the allowlist.
#[weight = <SelfWeightOf<T>>::remove_from_allow_list()]
- #[transactional]
pub fn remove_from_allow_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
@@ -466,7 +460,6 @@
/// * `collection_id`: ID of the modified collection.
/// * `new_owner`: ID of the account that will become the owner.
#[weight = <SelfWeightOf<T>>::change_collection_owner()]
- #[transactional]
pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
@@ -501,8 +494,7 @@
/// * `collection_id`: ID of the Collection to add an admin for.
/// * `new_admin`: Address of new admin to add.
#[weight = <SelfWeightOf<T>>::add_collection_admin()]
- #[transactional]
- pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin: T::CrossAccountId) -> DispatchResult {
+ pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin_id: T::CrossAccountId) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let collection = <CollectionHandle<T>>::try_get(collection_id)?;
collection.check_is_internal()?;
@@ -530,7 +522,6 @@
/// * `collection_id`: ID of the collection to remove the admin for.
/// * `account_id`: Address of the admin to remove.
#[weight = <SelfWeightOf<T>>::remove_collection_admin()]
- #[transactional]
pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let collection = <CollectionHandle<T>>::try_get(collection_id)?;
@@ -558,7 +549,6 @@
/// * `collection_id`: ID of the modified collection.
/// * `new_sponsor`: ID of the account of the sponsor-to-be.
#[weight = <SelfWeightOf<T>>::set_collection_sponsor()]
- #[transactional]
pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
@@ -590,7 +580,6 @@
///
/// * `collection_id`: ID of the collection with the pending sponsor.
#[weight = <SelfWeightOf<T>>::confirm_sponsorship()]
- #[transactional]
pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {
let sender = ensure_signed(origin)?;
@@ -619,7 +608,6 @@
///
/// * `collection_id`: ID of the collection with the sponsor to remove.
#[weight = <SelfWeightOf<T>>::remove_collection_sponsor()]
- #[transactional]
pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
@@ -654,7 +642,6 @@
/// * `owner`: Address of the initial owner of the item.
/// * `data`: Token data describing the item to store on chain.
#[weight = T::CommonWeightInfo::create_item()]
- #[transactional]
pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
@@ -681,7 +668,6 @@
/// * `owner`: Address of the initial owner of the tokens.
/// * `items_data`: Vector of data describing each item to be created.
#[weight = T::CommonWeightInfo::create_multiple_items(&items_data)]
- #[transactional]
pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResultWithPostInfo {
ensure!(!items_data.is_empty(), Error::<T>::EmptyArgument);
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
@@ -703,7 +689,6 @@
/// * `properties`: Vector of key-value pairs stored as the collection's metadata.
/// Keys support Latin letters, `-`, `_`, and `.` as symbols.
#[weight = T::CommonWeightInfo::set_collection_properties(properties.len() as u32)]
- #[transactional]
pub fn set_collection_properties(
origin,
collection_id: CollectionId,
@@ -729,7 +714,6 @@
/// * `property_keys`: Vector of keys of the properties to be deleted.
/// Keys support Latin letters, `-`, `_`, and `.` as symbols.
#[weight = T::CommonWeightInfo::delete_collection_properties(property_keys.len() as u32)]
- #[transactional]
pub fn delete_collection_properties(
origin,
collection_id: CollectionId,
@@ -761,7 +745,6 @@
/// * `properties`: Vector of key-value pairs stored as the token's metadata.
/// Keys support Latin letters, `-`, `_`, and `.` as symbols.
#[weight = T::CommonWeightInfo::set_token_properties(properties.len() as u32)]
- #[transactional]
pub fn set_token_properties(
origin,
collection_id: CollectionId,
@@ -792,7 +775,6 @@
/// * `property_keys`: Vector of keys of the properties to be deleted.
/// Keys support Latin letters, `-`, `_`, and `.` as symbols.
#[weight = T::CommonWeightInfo::delete_token_properties(property_keys.len() as u32)]
- #[transactional]
pub fn delete_token_properties(
origin,
collection_id: CollectionId,
@@ -823,7 +805,6 @@
/// * `property_permissions`: Vector of permissions for property keys.
/// Keys support Latin letters, `-`, `_`, and `.` as symbols.
#[weight = T::CommonWeightInfo::set_token_property_permissions(property_permissions.len() as u32)]
- #[transactional]
pub fn set_token_property_permissions(
origin,
collection_id: CollectionId,
@@ -852,7 +833,6 @@
/// * `collection_id`: ID of the collection to which the tokens would belong.
/// * `data`: Explicit item creation data.
#[weight = T::CommonWeightInfo::create_multiple_items_ex(&data)]
- #[transactional]
pub fn create_multiple_items_ex(origin, collection_id: CollectionId, data: CreateItemExData<T::CrossAccountId>) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
@@ -871,7 +851,6 @@
/// * `collection_id`: ID of the collection.
/// * `value`: New value of the flag, are transfers allowed?
#[weight = <SelfWeightOf<T>>::set_transfers_enabled_flag()]
- #[transactional]
pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
@@ -901,7 +880,6 @@
/// * Fungible Mode: The desired number of pieces to burn.
/// * Re-Fungible Mode: The desired number of pieces to burn.
#[weight = T::CommonWeightInfo::burn_item()]
- #[transactional]
pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
@@ -940,7 +918,6 @@
/// * Fungible Mode: The desired number of pieces to burn.
/// * Re-Fungible Mode: The desired number of pieces to burn.
#[weight = T::CommonWeightInfo::burn_from()]
- #[transactional]
pub fn burn_from(origin, collection_id: CollectionId, from: T::CrossAccountId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
@@ -970,7 +947,6 @@
/// * Fungible Mode: The desired number of pieces to transfer.
/// * Re-Fungible Mode: The desired number of pieces to transfer.
#[weight = T::CommonWeightInfo::transfer()]
- #[transactional]
pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
@@ -994,7 +970,6 @@
/// * `amount`: Number of pieces of the item approved for a transaction (maximum of 1 for NFTs).
/// Set to 0 to revoke the approval.
#[weight = T::CommonWeightInfo::approve()]
- #[transactional]
pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
@@ -1026,7 +1001,6 @@
/// * Fungible Mode: The desired number of pieces to transfer.
/// * Re-Fungible Mode: The desired number of pieces to transfer.
#[weight = T::CommonWeightInfo::transfer_from()]
- #[transactional]
pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
@@ -1047,7 +1021,6 @@
/// * `new_limit`: New limits of the collection. Fields that are not set (None)
/// will not overwrite the old ones.
#[weight = <SelfWeightOf<T>>::set_collection_limits()]
- #[transactional]
pub fn set_collection_limits(
origin,
collection_id: CollectionId,
@@ -1081,7 +1054,6 @@
/// * `new_permission`: New permissions of the collection. Fields that are not set (None)
/// will not overwrite the old ones.
#[weight = <SelfWeightOf<T>>::set_collection_limits()]
- #[transactional]
pub fn set_collection_permissions(
origin,
collection_id: CollectionId,
@@ -1114,7 +1086,6 @@
/// * `token_id`: ID of the RFT.
/// * `amount`: New number of parts/pieces into which the token shall be partitioned.
#[weight = T::RefungibleExtensionsWeightInfo::repartition()]
- #[transactional]
pub fn repartition(
origin,
collection_id: CollectionId,