ChildBet Architecture
This transaction is responsible for associating a child bet with a parent bet using a unique bet UUID.
Inside the transaction's prepare
block, the code performs the following actions:
It retrieves the parent bet resource using the provided bet UUID from the smart contract's storage.
A new child bet is created by invoking the
createChildBet
function on the parent bet resource, providing the child bet's name and available options.The updated parent bet resource and the newly created child bet resource are stored back in the smart contract's storage.
A public link is established between the child bet's public path and its storage path to ensure accessibility.
By executing this transaction, users can create child bets associated with existing parent bets, allowing for the expansion of betting options within the FlowBetPalace application. The proper storage and linking of the child bet resource guarantee its availability and accessibility within the smart contract, ensuring accurate and secure bet management.
Last updated