use drt_sc_scenario::api::StaticApi; drt_sc::derive_imports!(); drt_sc::imports!(); // to test, run the following command in the crate folder: // cargo expand --test derive_managed_vec_item_struct_2_test > expanded.rs /// Obtained from a contract from the community. /// /// Unusually large, payload size is 74. #[derive(ManagedVecItem)] pub struct Auction { pub auctioned_token_type: TokenIdentifier, pub auctioned_token_nonce: u64, pub nr_auctioned_tokens: BigUint, pub auction_type: AuctionType, pub payment_token_type: RewaOrDcdtTokenIdentifier, pub payment_token_nonce: u64, pub min_bid: BigUint, pub max_bid: Option>, pub start_time: u64, pub deadline: u64, pub original_owner: ManagedAddress, pub current_bid: BigUint, pub current_winner: ManagedAddress, pub marketplace_cut_percentage: BigUint, pub creator_royalties_percentage: BigUint, } #[derive(ManagedVecItem)] pub enum AuctionType { None, NftBid, Nft, SftAll, SftOnePerPayment, } #[test] #[allow(clippy::assertions_on_constants)] fn struct_3_static() { assert_eq!( as drt_sc::types::ManagedVecItem>::payload_size(), 74 ); assert!(! as drt_sc::types::ManagedVecItem>::SKIPS_RESERIALIZATION); }