Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getBridgeProver method #44

Merged
merged 2 commits into from
Aug 26, 2022
Merged

Fix getBridgeProver method #44

merged 2 commits into from
Aug 26, 2022

Conversation

pustovalov
Copy link
Member

@pustovalov pustovalov commented Aug 17, 2022

get_bridge_provider was changed in this PR: https://github.com/aurora-is-near/aurora-engine/pull/62/files

Also waiting for this PR to return some value: aurora-is-near/aurora-engine#581

Before

$ node lib/aurora.js get-bridge-prover --network mainnet
/Users/pavel/Library/pnpm/global/5/.pnpm/near-api-js@0.39.0/node_modules/near-api-js/lib/providers/json-rpc-provider.js:80
            throw new errors_1.TypedError(`Querying ${args} failed: ${result.error}.\n${JSON.stringify(result, null, 2)}`, rpc_errors_1.getErrorTypeFromErrorMessage(result.error));
                  ^

TypedError: Querying [object Object] failed: wasm execution failed with error: FunctionCallError(MethodResolveError(MethodNotFound)).
{
  "block_hash": "B8Re2P2JyN62UFM6EBAjNBJorLeVQ81dE7dyhScZLKdC",
  "block_height": 72211849,
  "error": "wasm execution failed with error: FunctionCallError(MethodResolveError(MethodNotFound))",
  "logs": []
}
    at JsonRpcProvider.query (/Users/pavel/Library/pnpm/global/5/.pnpm/near-api-js@0.39.0/node_modules/near-api-js/lib/providers/json-rpc-provider.js:80:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Engine.callFunction (file:///Users/pavel/Library/pnpm/global/5/.pnpm/github.com+aurora-is-near+aurora.js@9845b0f/node_modules/@aurora-is-near/engine/lib/engine.js:293:24)
    at async Engine.getBridgeProvider (file:///Users/pavel/Library/pnpm/global/5/.pnpm/github.com+aurora-is-near+aurora.js@9845b0f/node_modules/@aurora-is-near/engine/lib/engine.js:157:17)
    at async Command.<anonymous> (file:///Users/pavel/Library/pnpm/global/5/.pnpm/@auroraisnear+cli@0.0.3/node_modules/@auroraisnear/cli/lib/aurora.js:71:28) {
  type: 'UntypedError',
  context: undefined
}

After

$ node lib/aurora.js get-bridge-prover --network mainnet
┌───────────────┐
│ bridge_prover │
├───────────────┤
│               │
└───────────────┘

$ node lib/aurora.js get-bridge-prover --network testnet
┌───────────────────────┐
│         bridge_prover │
├───────────────────────┤
│ prover.goerli.testnet │
└───────────────────────┘

Copy link
Contributor

@0x3bfc 0x3bfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, however can you fix the lint issues ?

@pustovalov
Copy link
Member Author

#45

Copy link
Collaborator

@spilin spilin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@spilin spilin merged commit f0b6478 into master Aug 26, 2022
@spilin spilin deleted the bridge-prover branch August 26, 2022 14:17
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.

None yet

3 participants