near / near-jsonrpc-client-rs

Lower-level API for interfacing with the NEAR Protocol via JSONRPC.
https://docs.rs/near-jsonrpc-client
Apache License 2.0
47 stars 41 forks source link

updated near-primitives and associated crates #122

Closed anthony-near closed 1 year ago

anthony-near commented 1 year ago

needed for releasing the relayer used for meta transactions https://github.com/near/pagoda-relayer-rs/pull/1 and cli changes https://github.com/near/near-cli-rs/pull/151

miraclx commented 1 year ago

Contextual CI error:

thread 'methods::query::tests::test_contract_execution_error' panicked at 'this is unexpected: ServerError(
    HandlerError(
        ContractExecutionError {
            vm_error: "wasm execution failed with error: MethodResolveError(MethodEmptyName)",
            block_height: 63503911,
            block_hash: 4vMwedjLwTvGGzW23qJQrbaPmNKxQ3xetKXm6s1o8isP,
        },
    ),
)', src/methods/query.rs:175:9

Looks like https://github.com/near/nearcore/pull/7815 changed things a bit. And got rid of the VMResult enum that encapsulated the VMOutcome + VMError. And instead just unwrapped that into a Result from which a VMOutcome is unwrapped.

For this reason, the string inside the outcome report has changed a little.

-wasm execution failed with error: FunctionCallError(MethodResolveError(MethodEmptyName))
+wasm execution failed with error: MethodResolveError(MethodEmptyName)

@anthony-near, can you update the following lines to exclude the FunctionCallError(..) wrap:

  1. https://github.com/near/near-jsonrpc-client-rs/blob/18b998b0d673c157c763c9a00594309685f90967/src/methods/query.rs#L117
  2. https://github.com/near/near-jsonrpc-client-rs/blob/18b998b0d673c157c763c9a00594309685f90967/src/methods/query.rs#L182