Skip to content

Comments

Add etherscan_api bash function for Etherscan API v2 POST requests#32

Merged
Yaketh (Kushmanmb) merged 5 commits intocopilot/verify-smart-contractfrom
copilot/post-etherscan-api-request
Feb 4, 2026
Merged

Add etherscan_api bash function for Etherscan API v2 POST requests#32
Yaketh (Kushmanmb) merged 5 commits intocopilot/verify-smart-contractfrom
copilot/post-etherscan-api-request

Conversation

Copy link

Copilot AI commented Feb 4, 2026

Adds a bash convenience function for making POST requests to Etherscan API v2 endpoint.

Changes

  • .bashrc: New etherscan_api() function wrapping curl --request POST --url https://api.etherscan.io/v2/api
  • BASHRC.md: Documentation with usage examples

Usage

source .bashrc

# JSON request
etherscan_api -H 'Content-Type: application/json' -d '{"module":"contract","action":"getabi","address":"0x..."}'

# Form-encoded with API key
etherscan_api -d 'chainid=2201&module=contract&action=getsourcecode&address=0x...&apikey=YOUR_API_KEY'

Function accepts any curl options via passthrough.

Original prompt

curl --request POST
--url https://api.etherscan.io/v2/api


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits February 4, 2026 13:20
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Copilot AI changed the title [WIP] Add POST request to Etherscan API Add etherscan_api bash function for Etherscan API v2 POST requests Feb 4, 2026
@Kushmanmb Yaketh (Kushmanmb) marked this pull request as ready for review February 4, 2026 13:39
@Kushmanmb Yaketh (Kushmanmb) merged commit 21221e9 into copilot/verify-smart-contract Feb 4, 2026
2 checks passed
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.

2 participants