Skip to content

RiscZero Battleship Example Javascript Error #15

Description

@mercush

I am trying to run the tutorial risczero battleship example (available here) but am getting the following error message.

new_game: JsValue(Error: {"index":0,"kind":{"ExecutionError":"Smart contract panicked: panicked at 'called `Result::unwrap()` on an `Err` value: MethodVerificationError', /Users/flaub/.cargo/registry/src/github.com-1ecc6299db9ec823/risc0-zkvm-verify-0.8.0/src/zkvm/mod.rs:40:47"}} TypedError@https://cdn.jsdelivr.net/npm/near-api-js@0.41.0/dist/near-api-js.js:3269:9 ServerError@https://cdn.jsdelivr.net/npm/near-api-js@0.41.0/dist/near-api-js.js:3595:1 ServerTransactionError@https://cdn.jsdelivr.net/npm/near-api-js@0.41.0/dist/near-api-js.js:3598:1 parseResultError@https://cdn.jsdelivr.net/npm/near-api-js@0.41.0/dist/near-api-js.js:3611:29 signAndSendTransactionV2@https://cdn.jsdelivr.net/npm/near-api-js@0.41.0/dist/near-api-js.js:163:36 )

I get this error message shortly after I make my move in the game.

It should be noted that I wasn't initially able to build the example so I made a modification to the code. In the contract/cargo.toml file, I added the dependency getrandom = { version = "0.2", features = ["js"] }. This is what I was advised to do here.

Please let me know if there is a way to make this work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions