get_raw_code_and_abi
The get_raw_code_and_abi method retrieves both the raw contract code (WASM) and the Application Binary Interface (ABI) for a specific EOS account.
This method is essential for developers who need to inspect, decode, or interact with smart contracts deployed on the EOS blockchain.
It provides direct access to the key building blocks that define how a contract behaves and how external applications can interact with it.
Example use cases:
Understanding Smart Contracts
Developers can use this method to access raw WASM and ABI data, helping them understand the structure, functions, and expected parameters of a smart contract.
Development and Debugging
Accessing the raw code and ABI enables developers to debug, validate, and optimize their contract implementations during development.
Enhanced Contract Interaction
Tools and DApps can fetch ABI information programmatically to correctly encode and decode actions and data, ensuring seamless smart contract interaction.
Parameters
The getRawCodeAndAbi method accepts the following parameter:
parameter | type | description |
|---|---|---|
accountName | string | The EOS account name whose raw WASM code and ABI should be retrieved. Can be NamePrivileged, NameBasic, NameBid, or NameCatchAll. |
Returns
The method returns an object containing the WASM code and ABI of the contract.
field | description |
|---|---|
account_name | The name of the account whose contract information was requested. |
wasm | The base64-encoded WebAssembly (WASM) code of the smart contract. |
abi | The base64-encoded ABI (Application Binary Interface) of the smart contract. |
JSON-RPC Request Example
Response Example