Skip to content

Add batcher and local wallet, do NFT indexing ourselves#122

Merged
SpaceManiac merged 33 commits intomainfrom
patch/upgrade-2
Oct 29, 2024
Merged

Add batcher and local wallet, do NFT indexing ourselves#122
SpaceManiac merged 33 commits intomainfrom
patch/upgrade-2

Conversation

@SpaceManiac
Copy link
Contributor

@SpaceManiac SpaceManiac commented Oct 29, 2024

  • Remove external indexer dependencies in favor of Paima primitives
    • Add Hardhat configuration for AnnotatedMintNft contract, like Tarochi for Genesis Trainers
    • Use Tarochi Genesis Trainer entry in extensions.$ENV.yml to track NFT ownership
    • Track per-NFT win/lose stats in a new table, according to what NFT was selected when a lobby was created or joined
    • Fulfill relevant API routes:
      • /account-nfts
        • Includes all linked wallets
      • /historical-owner (currently ignores passed-in contract address and block height)
      • /title-image (currently ignores passed-in contract address)
      • /nft-score (currently ignores passed-in contract address)
  • Add LocalWallet and wallet delegation handling
    • Add batcher startup configuration
    • Old middleware method userWalletLogin returns as soon as LocalWallet is ready
    • LocalWallet and batcher are used for most game transactions instead of requiring signing each time
    • New middleware method externalWalletConnect follows full delegation procedure and posts &wd| message to batcher
    • All API routes use "main wallet" when sensible
  • Update a few more misc NPM packages

Future work:

  • Test NFT-less play in non-debug builds
  • Test/refine "main wallet" handling in API for corner cases, such as playing some NFT-less games then connecting a wallet

Depends on: PaimaStudios/paima-engine#439

@SpaceManiac SpaceManiac merged commit 2460fa7 into main Oct 29, 2024
@SpaceManiac SpaceManiac deleted the patch/upgrade-2 branch October 29, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant