Comments (4)
Just found this and have not had the time yet to investigate.
from 0xfable.
Console points to contract:
setting error modal: {"title":"Contract execution error","message":"SyntaxError: Cannot convert #bigint.20826557750498812955920791981733214788339539821236692591183101691377953231916 to a BigInt","buttons":[{"text":"Dismiss"}]}
from 0xfable.
Hhm, so the error message points at the serialization we use to persist bigints in the browser storage. It seems like the string representing the bigint is not parsed correctly and is being fed directly to the contract instead of a bigint.
We override the JSON.stringify
and JSON.parse
logic in the setup.ts file.
I think we should try to pinpoint in which scenarios this happens. Clearly it doesn't happen if we don't mint and use users 0 and 1, right?
The standard deployment script should mint decks to index 0 and index 1, so I'm already surprised you manage to mint a deck to index 1? Okay lmao, we never set the claimed flag here: https://github.com/0xFableOrg/0xFable/blob/master/packages/contracts/src/DeckAirdrop.sol — that shouldn't be causing this issue though, but worth trying anyway.
Can you pinpoint the transaction in which this happens? joinGame
, or drawInitialHand
(you should be able to tell by the changing modal text, if not by the console). Mostly likely it's joinGame
and the culprit is the gameID
... not sure what could have changed to make that into a parsed string though... so maybe not.
Good debugging exercise in perspective :D
from 0xfable.
The culprit here is the saltHash
param in the doJoinGameTransaction
. The function expects a bigint but is being fed a string, from PrivateInfo.saltHash
.
![Screenshot 2024-03-21 at 8 52 54 PM](https://private-user-images.githubusercontent.com/29869492/315479994-dbd8d004-a98e-4551-97c9-d00f1d9e5efb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgwODA4ODEsIm5iZiI6MTcxODA4MDU4MSwicGF0aCI6Ii8yOTg2OTQ5Mi8zMTU0Nzk5OTQtZGJkOGQwMDQtYTk4ZS00NTUxLTk3YzktZDAwZjFkOWU1ZWZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjExVDA0MzYyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4ZTZjYzdhNDQ0Njc3MDBlNGU1NTU3NjBlNWQwNDk3MzYwYjM3YjZmMjJiNTExODA2Nzg4OTFkNDI3ZGEwYzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RLk-dv3rXfzdOgnkuQ5nSufHOyH0HAlmzGyTvXwinxc)
from 0xfable.
Related Issues (20)
- Merge Collection and Editor HOT 1
- Bring custom decks onchain HOT 2
- Improve text readability HOT 1
- Automate card draw HOT 1
- Add Deck Validity Status when Constructing Deck HOT 1
- Fix validateDOMNesting error
- Fetch game ID for game creator HOT 1
- Implement player handles HOT 13
- Implement a PoC chatbox HOT 7
- Add Github CI checks for linting etc HOT 3
- Add indicators for illegal card play HOT 7
- Fix join game flow race condition (regression)
- Fix regression in global error modal HOT 1
- Card displayed in play area is not the same as card being played from hand
- Card draw animation plays on initial hand HOT 5
- Split Game.sol to fit under the contract size
- Overhaul card collection display HOT 1
- Complete 0xFable Proof-of-Concept
- Use `shadcn/ui` as the primary component library.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 0xfable.