4. Xcavate Marketplace Pallet
Setup:
Prepare accounts with roles and :
Alice - RegionalOperator2 (developer) & RealEstateInvestor3
Bob - RealEstateInvestor1
Charlie - RealEstateDeveloper1 & RegionalOperator1
Dave - RealEstateInvestor2 & SpvConfirmation (SPV role)
Eve - Lawyer (developer-side) & RealEstateInvestor4
Ferdie - Lawyer (SPV-side) & RegionalOperator3
Ensure these accounts have balances in native currency and in any accepted assets (USDC/USDT). Use whichever asset pallet the chain supports.
Ensure the lawyers are registered with the regions pallet
Useful polkadot.js UI locations:
Developer → Chain state — query storage maps (choose
marketplacepallet and storage item)Developer → Extrinsics — submit transactions
Chain state → Constants — read pallet constants (ListingDeposit, etc.)
Explorer → Events — review events for each block/transactions
Accounts — view balances (Free / Reserved / Frozen)
Extrinsics → Sign & Submit — choose account to sign transactions
Example test data (replace with the chain constants):
region_id = 1location = E1 7DB or 1(or any valid location id)accepted_assetse.g.1 => USDC,2 => USDT(queryAcceptedAssetsstorage/constant)token_priceexample:1_000_000_000 u128(depends on balance units)token_amountexample:100 u32deposit= value ofListingDepositconstantlisting_id— will be read fromNextListingIdbefore and afterlist_property
Storage keys to monitor (Developer → Chain state). (Use Developer → Chain state; choose
marketplacepallet and the storage item)NextListingId— next listing index (u64).OngoingObjectListing(listing_id)— full listing struct (developer, token_price, token_amount, listed_token_amount, listing_expiry, tax, collected_funds, collected_fees, collected_tax, claim_expiry, relist_count, unclaimed_token_amount, asset_id, item_id, collection_id...).ListingDeposits(listing_id)— (depositor, deposit_amount).TokenOwner(listing_id, account)orTokenOwner(account, listing_id)— token owner entry for an investor.TokenListings(listing_id)— secondary-market listing details.PropertyLawyer(listing_id)— lawyer/legal process struct (lawyers, statuses, lawyer costs, expiry, second_attempt).ProposedLawyers(listing_id)— developer-side proposed lawyer.ListingSpvProposal(listing_id)&SpvLawyerProposal(proposal_id)— SPV-side proposals.OngoingLawyerVoting(proposal_id)— yes/no tallies.UserLawyerVote(proposal_id, account)— per-voter vote record.RefundClaimedToken(listing_id),RefundLegalExpired(listing_id),RefundToken(listing_id)— refund trackers.
Global test approach for each extrinsic. For every test step, follow this micro-workflow:
Pre-check: query relevant storage/constant values and note them (e.g.,
NextListingId, account balances,OngoingObjectListing(listing_id)if exists).Submit extrinsic: Developer → Extrinsics → choose pallet
marketplace→ select call → fill parameters → Sign & Submit as the required role account.Observe: wait for block, open Explorer → Events and Chain state to verify events and storage changes.
Post-check: query exactly the storage items listed under “expected chain state” to confirm the expected mutation. Also check account balances/reserved.
Negative tests: repeat with an obvious invalid input and verify the call fails and appropriate event/error is produced.
Last updated