AptosAptos Network's breakthrough technology and seamless user experience are now available on QuickNode.
Start building today!The eth_getCode EVM method is only supported on the Avalanche C-Chain.
The API credit value for this method is 2 . To learn more about API credits and each method's value, visit the API Credits page.
Parameters:
Returns:
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.
curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/C/rpc \ -X POST \ -H "Content-Type: application/json" \ --data '{"method":"eth_getCode","params":["0x5B56438000bAc5ed2c6E0c1EcFF4354aBfFaf889","latest"],"id":1,"jsonrpc":"2.0"}'
from web3 import Web3, HTTPProvider w3 = Web3(HTTPProvider('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/C/rpc')) print (w3.eth.get_code('0x5B56438000bAc5ed2c6E0c1EcFF4354aBfFaf889'))
const ethers = require("ethers"); (async () => { const provider = new ethers.providers.JsonRpcProvider( "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/C/rpc" ); const code = await provider.getCode( "0x5B56438000bAc5ed2c6E0c1EcFF4354aBfFaf889", "latest" ); console.log(code); })();
require 'ethereum.rb' client = Ethereum::HttpClient.new('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/C/rpc') code = client.eth_get_code('0x5B56438000bAc5ed2c6E0c1EcFF4354aBfFaf889') puts code["result"]