From c401aec180d21b865e0c1890da2eb4e079692ca6 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Fri, 20 Dec 2024 10:02:17 -0800 Subject: [PATCH] remove eth_getAssetBalance --- content/docs/api-reference/c-chain/api.mdx | 60 +------------------ .../docs/api-reference/c-chain/configs.mdx | 1 - content/docs/nodes/chain-configs/c-chain.mdx | 1 - .../avalanche-postman/data-visualization.mdx | 1 - 4 files changed, 1 insertion(+), 62 deletions(-) diff --git a/content/docs/api-reference/c-chain/api.mdx b/content/docs/api-reference/c-chain/api.mdx index 91d6da25c0c..9b72b7a3907 100644 --- a/content/docs/api-reference/c-chain/api.mdx +++ b/content/docs/api-reference/c-chain/api.mdx @@ -83,7 +83,7 @@ number of items is 40. We are working on to support a larger batch size. ### Avalanche - Ethereum APIs -In addition to the standard Ethereum APIs, Avalanche offers `eth_getAssetBalance`, `eth_baseFee`, +In addition to the standard Ethereum APIs, Avalanche offers `eth_baseFee`, `eth_maxPriorityFeePerGas`, and `eth_getChainConfig`. They use the same endpoint as standard Ethereum APIs: @@ -92,64 +92,6 @@ They use the same endpoint as standard Ethereum APIs: /ext/bc/C/rpc ``` -#### `eth_getAssetBalance` - -Retrieves the balance of first class Avalanche Native Tokens on the C-Chain (excluding AVAX, -which must be fetched with `eth_getBalance`). - - - -The AssetID for AVAX differs depending on the network you are on. - -Mainnet: FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z - -Testnet: U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK - -For finding the `assetID` of other assets, please note that -`avax.getUTXOs` and `avax.getAtomicTx` return the `assetID` in -their output. - - - -**Signature:** - -```sh -eth_getAssetBalance({ - address: string, - blk: BlkNrOrHash, - assetID: string, -}) -> {balance: int} -``` - -- `address` owner of the asset -- `blk` is the block number or hash at which to retrieve the balance -- `assetID` id of the asset for which the balance is requested - -**Example Call:** - -```sh -curl -X POST --data '{ - "jsonrpc": "2.0", - "method": "eth_getAssetBalance", - "params": [ - "0x8723e5773847A4Eb5FeEDabD9320802c5c812F46", - "latest", - "3RvKBAmQnfYionFXMfW5P8TDZgZiogKbHjM8cjpu16LKAgF5T" - ], - "id": 1 -}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/rpc -``` - -**Example Response:** - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": "0x1388" -} -``` - #### `eth_baseFee` Get the base fee for the next block. diff --git a/content/docs/api-reference/c-chain/configs.mdx b/content/docs/api-reference/c-chain/configs.mdx index b5b1bd0ca62..0b04075cc5c 100644 --- a/content/docs/api-reference/c-chain/configs.mdx +++ b/content/docs/api-reference/c-chain/configs.mdx @@ -274,7 +274,6 @@ Adds the following RPC calls to the `eth_*` namespace. Defaults to `true`. - `eth_chainId` - `eth_blockNumber` - `eth_getBalance` -- `eth_getAssetBalance` - `eth_getProof` - `eth_getHeaderByNumber` - `eth_getHeaderByHash` diff --git a/content/docs/nodes/chain-configs/c-chain.mdx b/content/docs/nodes/chain-configs/c-chain.mdx index 25b5ff758fc..f0ea072a63d 100644 --- a/content/docs/nodes/chain-configs/c-chain.mdx +++ b/content/docs/nodes/chain-configs/c-chain.mdx @@ -225,7 +225,6 @@ Adds the following RPC calls to the `eth_*` namespace. Defaults to `true`. - `eth_chainId` - `eth_blockNumber` - `eth_getBalance` -- `eth_getAssetBalance` - `eth_getProof` - `eth_getHeaderByNumber` - `eth_getHeaderByHash` diff --git a/content/docs/tooling/avalanche-postman/data-visualization.mdx b/content/docs/tooling/avalanche-postman/data-visualization.mdx index cbee1e24da8..3b94460918c 100644 --- a/content/docs/tooling/avalanche-postman/data-visualization.mdx +++ b/content/docs/tooling/avalanche-postman/data-visualization.mdx @@ -13,7 +13,6 @@ Data visualizations are available for following API calls: - [`eth_baseFee`](/api-reference/c-chain/api#eth_basefee) - [`eth_blockNumber`](https://www.quicknode.com/docs/ethereum/eth_blockNumber) - [`eth_chainId`](https://www.quicknode.com/docs/ethereum/eth_chainId) -- [`eth_getAssetBalance`](/api-reference/c-chain/api#eth_getassetbalance) - [`eth_getBalance`](https://www.quicknode.com/docs/ethereum/eth_getBalance) - [`eth_getBlockByHash`](https://www.quicknode.com/docs/ethereum/eth_getBlockByHash) - [`eth_getBlockByNumber`](https://www.quicknode.com/docs/ethereum/eth_getBlockByNumber)