Skip to content

Conversation

@athei
Copy link
Collaborator

@athei athei commented Jan 4, 2023

The new ink! beta wraps cross contract calls into a Result<T, LangError>. Our low level cross contract call didn't account for that and hence failed to decode the Turn. It just decoded garbage which then turned out to be out of bounds.

@xermicus You need to make sure that your handwritten sol contract wraps the value as to game expects this after this PR is merged. Option just prepends one byte (0=None, 1=Some).

@athei athei requested a review from DoubleOTheven January 4, 2023 16:52
@netlify
Copy link

netlify bot commented Jan 4, 2023

Deploy Preview for squink-splash canceled.

Name Link
🔨 Latest commit 51926d6
🔍 Latest deploy log https://app.netlify.com/sites/squink-splash/deploys/63b5aeb6f894890008cb30b6

@athei athei merged commit 520e6f5 into main Jan 4, 2023
@athei athei deleted the at/fix-turn-decoding branch January 4, 2023 16:56
@ascjones
Copy link
Collaborator

ascjones commented Jan 4, 2023

linking use-ink/ink#1512

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.

4 participants