Marketplace has launched, further enabling blockchain developers! Learn more

Contents

eth_getCode RPC method

The eth_getCode EVM method is only supported on the Avalanche C-Chain.

Parameters:

  1. Address - The address to check for code.

Returns:

  1. result - String value of the compiled bytecode.

Code Examples:

To use the eth_getCode EVM method on the Avalanche C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.

require 'ethereum.rb'
client = Ethereum::HttpClient.new('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/')
code = client.eth_get_code('0x5B56438000bAc5ed2c6E0c1EcFF4354aBfFaf889')
puts code["result"]
Ready to get started? Create a free account