Skip to content

v2.0.0

Choose a tag to compare

@SebastienGllmt SebastienGllmt released this 04 Nov 07:52
· 219 commits to master since this release

Breaking changes

  • CDE database format changed (game database will need to be reset)
  • Wallet login mechanism changed (ex: userWalletLogin, getAddress). See example upgrade here

New features

  • ERC6551 CDE support. See docs here
  • EIP6963 and EIP5749 implemented for wallet detection (no longer only Metamask)
  • Providers now expose a getWalletOptions function to fetch all wallets available. This makes it easier to know which wallets to show in your dApp as option
  • Support for games specifying which wallets they want to connect to by name or injecting their own wallet (previously, you had to pass in the wallet name from a pre-specified list of wallets Paima accepted)
  • Allow multiple providers to be connected at once. Useful if you want a browser wallet connected to Paima at the same time as a session key
  • Add a way to specify "default" connector to be used unless explicitly told not to (useful to make the session key the default)
  • Add support for any Ethers Signer (@ethersproject/abstract-signer) based wallets (useful for Thirdweb support)
  • Add allInjectedWallets to get all the injected wallets of every cryptocurrency Paima supports at once

You can find the docs for the wallet connection changes here

Bug fixes

  • Fix a bug where ERC20Deposit CDE was making more RPC requests than necessary (wasn't filtering on the to field)
  • Fix ERC20 deployment contracts possibly adding null currencies to the list of ERC20 tokens supported for payments
  • Lowered the amount of backend & RPC calls made by games that that call the wallet login method in a loop
  • Fixed connectExternal for wallets re-creating a wallet connection if connecting to the same wallet
  • Improved error message for missing blocks in paima-funnel
  • When using emulated blocks, if a chain took too longer (longer than 8 seconds) for a transaction to appear on chain, it would fail (even if EMULATED_BLOCKS_MAX_WAIT is set to a higher value)
  • Fix emulated blocks sometimes not creating a block even though they should be able to (result is the same, but this fix should make it go a bit faster)
  • Fix start.sh docker script being broken
  • Fix message signing for Nami wallet
  • Fix named connection type for Etheruem potentially missing a wallet if that wallet implements multiple injection standards
  • Fix some wallets aggressively adding themselves as the default even if a user has never installed it (ex: Brave's built-in crypto wallet)

Chore

  • Improved logging for emulated blocks so it's easier to know which blocks correspond to which timestamp ranges
  • Clarify wording in the contract deploy script
  • Add MIT SPDX headers to Solidity files

Internal

  • Nx added a feature I requested where choosing build parallelism is an ENV var, so I migrated Paima build to NX_PARALLEL
  • Fix an issue where eslint setup wasn't detecting mts files
  • Fix bug where jest tests weren't able to import other packages part of the Paima repo
  • Changed the CDE config parsing so that types and parsing logic are unified using typebox instead of being duplicated
  • Added a test for CDE config file parsing
  • Simplified logic for testing if CDE configs match what an already populated database used to sync. It now checks the hash of the config instead of having to manually create cache keys to compare if something changed. This allows deleting all the config SQL tables
  • Updated Web3 provider to easily allow middleware like logging RPC requests by commenting out a few lines
  • Add explicit .js extension for imports/exports
  • Fix jest.config.js being excluded in paima-concise causing test failures

Full Changelog: v1.1.5...v2.0.0