Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

update console for external services #1453

Closed
wants to merge 1 commit into from
Closed

update console for external services #1453

wants to merge 1 commit into from

Conversation

zacscoding
Copy link
Contributor

Proposed changes

  • use all api modules if "rpc_module" not found in the console
  • add header flags for console

Types of changes

Please put an x in the boxes related to your change.

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes ($ make test)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Related issues

  • Please leave the issue numbers or links related to this PR here.

Further comments

Although console is the useful interactive cli tools, we could not request to external api services such as KAS.
Now we can use console cli for external apis like below

$ ./ken attach https://node-api.klaytnapi.com/v1/klaytn --header 'x-chain-id:8217' --header 'Authorization:Basic S0...'
Welcome to the Klaytn JavaScript console!

instance: Klaytn/v1.8.3/linux-amd64/go1.18
use all modules because "rpc_modules" does not supported

> klay.blockNumber
94325753

> admin.peers
Error: 400 Bad Request: {"code":1034210,"message":"Unsupported method - admin_peers","requestId":"ac28ef9a-9dd7-9793-83c1-49ec16b6d214"}
    at web3.js:3278:20
....

@zacscoding zacscoding changed the title Patch console update console for external services Jun 22, 2022
Copy link
Contributor

@hyunsooda hyunsooda left a comment

Choose a reason for hiding this comment

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

Seems good change.

console/console.go Show resolved Hide resolved
console/console.go Show resolved Hide resolved
console/console.go Show resolved Hide resolved
console/console.go Outdated Show resolved Hide resolved
console/console.go Outdated Show resolved Hide resolved
hyunsooda
hyunsooda previously approved these changes Jul 19, 2022
@yoomee1313 yoomee1313 requested review from kjeom and ian0371 and removed request for sirano11, aeharvlee, JayChoi1736 and 2dvorak December 27, 2022 08:32
console/console.go Show resolved Hide resolved
console/console.go Outdated Show resolved Hide resolved
@zacscoding
Copy link
Contributor Author

As ethereum has already implemented it, i will close this PR :(

@zacscoding zacscoding closed this Mar 21, 2023
@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration .github/workflows/CodeQL.yml:CodeQL-Build. As part of the setup process, we have scanned this repository and found 6 existing alerts. Please check the repository Security tab to see all alerts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants