Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ house and economic policy through its imported faction. `game_auction` is the pu
its item columns are the complete item-instance snapshot while no inventory row exists, and its
house and rate columns preserve the listing-time policy. Private `game_auction_hold` is the source-shard value fence;
private `game_auction_operation_receipt` makes listing retries idempotent after that Hold is deleted.
When realm-core refuses a held listing, it records a payload-matching `auction_id == 0` receipt and
mails the held item and deposit back to the seller in one transaction. Only then does
`gw_auction_release_listing_hold` delete the source Hold; a Hold with an active receipt is never
released.
Private `game_auction_bid_hold` fences a bidder's complete offer and retains the terminal source
outcome, normalized accepted price, and any purse-overflow refund awaiting relay; private
`game_auction_bid_decision` is realm-core's serialized, replay-safe decision and exact-once
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.

#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};

#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub(super) struct GwAuctionReleaseListingHoldArgs {
pub operation_id: u64,
pub seller_guid: u64,
}

impl From<GwAuctionReleaseListingHoldArgs> for super::Reducer {
fn from(args: GwAuctionReleaseListingHoldArgs) -> Self {
Self::GwAuctionReleaseListingHold {
operation_id: args.operation_id,
seller_guid: args.seller_guid,
}
}
}

impl __sdk::InModule for GwAuctionReleaseListingHoldArgs {
type Module = super::RemoteModule;
}

#[allow(non_camel_case_types)]
/// Extension trait for access to the reducer `gw_auction_release_listing_hold`.
///
/// Implemented for [`super::RemoteReducers`].
pub trait gw_auction_release_listing_hold {
/// Request that the remote module invoke the reducer `gw_auction_release_listing_hold` to run as soon as possible.
///
/// This method returns immediately, and errors only if we are unable to send the request.
/// The reducer will run asynchronously in the future,
/// and this method provides no way to listen for its completion status.
/// /// Use [`gw_auction_release_listing_hold:gw_auction_release_listing_hold_then`] to run a callback after the reducer completes.
fn gw_auction_release_listing_hold(&self, operation_id: u64, seller_guid: u64) -> __sdk::Result<()> {
self.gw_auction_release_listing_hold_then(operation_id, seller_guid, |_, _| {})
}

/// Request that the remote module invoke the reducer `gw_auction_release_listing_hold` to run as soon as possible,
/// registering `callback` to run when we are notified that the reducer completed.
///
/// This method returns immediately, and errors only if we are unable to send the request.
/// The reducer will run asynchronously in the future,
/// and its status can be observed with the `callback`.
fn gw_auction_release_listing_hold_then(
&self,
operation_id: u64,
seller_guid: u64,

callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()>;
}

impl gw_auction_release_listing_hold for super::RemoteReducers {
fn gw_auction_release_listing_hold_then(
&self,
operation_id: u64,
seller_guid: u64,

callback: impl FnOnce(&super::ReducerEventContext, Result<Result<(), String>, __sdk::InternalError>)
+ Send
+ 'static,
) -> __sdk::Result<()> {
self.imp.invoke_reducer_with_callback(
GwAuctionReleaseListingHoldArgs {
operation_id,
seller_guid,
},
callback,
)
}
}
73 changes: 73 additions & 0 deletions gateway/src/stdb/bindings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ pub mod gw_auction_finish_bid_reducer;
pub mod gw_auction_hold_bid_reducer;
pub mod gw_auction_hold_listing_reducer;
pub mod gw_auction_list_local_reducer;
pub mod gw_auction_release_listing_hold_reducer;
pub mod gw_auto_bank_item_reducer;
pub mod gw_begin_trade_reducer;
pub mod gw_bind_home_reducer;
Expand Down Expand Up @@ -785,6 +786,7 @@ pub mod realm_auction_commit_listing_reducer;
pub mod realm_auction_confirm_listing_reducer;
pub mod realm_auction_decide_bid_reducer;
pub mod realm_auction_refund_bid_reducer;
pub mod realm_auction_refund_listing_reducer;
pub mod realm_auction_settle_listing_reducer;
pub mod realm_group_op_reducer;
pub mod realm_loot_op_reducer;
Expand Down Expand Up @@ -1560,6 +1562,7 @@ pub use gw_auction_finish_bid_reducer::gw_auction_finish_bid;
pub use gw_auction_hold_bid_reducer::gw_auction_hold_bid;
pub use gw_auction_hold_listing_reducer::gw_auction_hold_listing;
pub use gw_auction_list_local_reducer::gw_auction_list_local;
pub use gw_auction_release_listing_hold_reducer::gw_auction_release_listing_hold;
pub use gw_auto_bank_item_reducer::gw_auto_bank_item;
pub use gw_begin_trade_reducer::gw_begin_trade;
pub use gw_bind_home_reducer::gw_bind_home;
Expand Down Expand Up @@ -1746,6 +1749,7 @@ pub use realm_auction_commit_listing_reducer::realm_auction_commit_listing;
pub use realm_auction_confirm_listing_reducer::realm_auction_confirm_listing;
pub use realm_auction_decide_bid_reducer::realm_auction_decide_bid;
pub use realm_auction_refund_bid_reducer::realm_auction_refund_bid;
pub use realm_auction_refund_listing_reducer::realm_auction_refund_listing;
pub use realm_auction_settle_listing_reducer::realm_auction_settle_listing;
pub use realm_group_op_reducer::realm_group_op;
pub use realm_loot_op_reducer::realm_loot_op;
Expand Down Expand Up @@ -2782,6 +2786,10 @@ pub enum Reducer {
buyout: u32,
duration_minutes: u32,
},
GwAuctionReleaseListingHold {
operation_id: u64,
seller_guid: u64,
},
GwAutoBankItem {
actor_guid: u64,
slot: u8,
Expand Down Expand Up @@ -3258,6 +3266,25 @@ pub enum Reducer {
offer: u32,
deferred_refund: u32,
},
RealmAuctionRefundListing {
operation_id: u64,
seller_guid: u64,
item_guid: u64,
item_entry: u32,
item_stack_count: u32,
item_durability: u32,
item_enchant_id: u32,
item_soulbound: bool,
house: u32,
deposit_rate: u32,
consignment_rate: u32,
start_bid: u32,
buyout: u32,
duration_minutes: u32,
deposit: u32,
created_micros: i64,
expires_micros: i64,
},
RealmAuctionSettleListing {
operation_id: u64,
},
Expand Down Expand Up @@ -3738,6 +3765,7 @@ impl __sdk::Reducer for Reducer {
Reducer::GwAuctionHoldBid { .. } => "gw_auction_hold_bid",
Reducer::GwAuctionHoldListing { .. } => "gw_auction_hold_listing",
Reducer::GwAuctionListLocal { .. } => "gw_auction_list_local",
Reducer::GwAuctionReleaseListingHold { .. } => "gw_auction_release_listing_hold",
Reducer::GwAutoBankItem { .. } => "gw_auto_bank_item",
Reducer::GwBeginTrade { .. } => "gw_begin_trade",
Reducer::GwBindHome { .. } => "gw_bind_home",
Expand Down Expand Up @@ -3853,6 +3881,7 @@ impl __sdk::Reducer for Reducer {
Reducer::RealmAuctionConfirmListing { .. } => "realm_auction_confirm_listing",
Reducer::RealmAuctionDecideBid { .. } => "realm_auction_decide_bid",
Reducer::RealmAuctionRefundBid { .. } => "realm_auction_refund_bid",
Reducer::RealmAuctionRefundListing { .. } => "realm_auction_refund_listing",
Reducer::RealmAuctionSettleListing { .. } => "realm_auction_settle_listing",
Reducer::RealmGroupOp { .. } => "realm_group_op",
Reducer::RealmLootOp { .. } => "realm_loot_op",
Expand Down Expand Up @@ -5427,6 +5456,13 @@ Reducer::DebugVerifyRangedLethalDamageFloorFixture{
start_bid: start_bid.clone(),
buyout: buyout.clone(),
duration_minutes: duration_minutes.clone(),
}),
Reducer::GwAuctionReleaseListingHold{
operation_id,
seller_guid,
} => __sats::bsatn::to_vec(&gw_auction_release_listing_hold_reducer::GwAuctionReleaseListingHoldArgs {
operation_id: operation_id.clone(),
seller_guid: seller_guid.clone(),
}),
Reducer::GwAutoBankItem{
actor_guid,
Expand Down Expand Up @@ -6270,6 +6306,43 @@ Reducer::PrepareVmapNavCoverage{
house: house.clone(),
offer: offer.clone(),
deferred_refund: deferred_refund.clone(),
}),
Reducer::RealmAuctionRefundListing{
operation_id,
seller_guid,
item_guid,
item_entry,
item_stack_count,
item_durability,
item_enchant_id,
item_soulbound,
house,
deposit_rate,
consignment_rate,
start_bid,
buyout,
duration_minutes,
deposit,
created_micros,
expires_micros,
} => __sats::bsatn::to_vec(&realm_auction_refund_listing_reducer::RealmAuctionRefundListingArgs {
operation_id: operation_id.clone(),
seller_guid: seller_guid.clone(),
item_guid: item_guid.clone(),
item_entry: item_entry.clone(),
item_stack_count: item_stack_count.clone(),
item_durability: item_durability.clone(),
item_enchant_id: item_enchant_id.clone(),
item_soulbound: item_soulbound.clone(),
house: house.clone(),
deposit_rate: deposit_rate.clone(),
consignment_rate: consignment_rate.clone(),
start_bid: start_bid.clone(),
buyout: buyout.clone(),
duration_minutes: duration_minutes.clone(),
deposit: deposit.clone(),
created_micros: created_micros.clone(),
expires_micros: expires_micros.clone(),
}),
Reducer::RealmAuctionSettleListing{
operation_id,
Expand Down
Loading