contract_get_code
Returns every verified source file available from Base Blockscout, deployed bytecode when available, and proxy implementation code. Read-only: use the complete result to assess honeypot indicators; it is not a safety verdict.
This record as markdown: /tools/awesome-base-mcp/contract-get-code.md
What contract_get_code does on Awesome Base
AI agents call contract_get_code to retrieve information from Awesome Base without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
Why contract_get_code is rated Low
Retrieves contract code for analysis; no side effects or state changes occur.
From the tool's definition Returns verified source file, deployed bytecode, proxy implementation code. Read-only.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs contract_get_code safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Awesome Base, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For contract_get_code, this is the rule to start with:
contract_get_code is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Awesome Base, apply this rule, and every contract_get_code call is checked against it from then on.
Questions about contract_get_code
Returns every verified source file available from Base Blockscout, deployed bytecode when available, and proxy implementation code. Read-only: use the complete result to assess honeypot indicators; it is not a safety verdict. It is categorised as a Read tool in the Awesome Base MCP Server, which means it retrieves data without modifying state.
Register the Awesome Base MCP server in PolicyLayer and add a rule for contract_get_code: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Awesome Base. Nothing to install.
contract_get_code is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the contract_get_code rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for contract_get_code. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
contract_get_code is provided by the Awesome Base MCP server (B5-Software/awesome-base-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Awesome Base, and thousands of servers like it.
This server
Across the catalogue