eth_getUncleCountByBlockHash RPC Method
To use the eth_getUncleCountByBlockHash method on the Avalanche C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.
매개변수
해시
문자열
필수
로딩 중...
반품
삼촌들
문자열
로딩 중...
요청
1curl https://docs-demo.avalanche-mainnet.quiknode.pro \2-X POST \3-H "Content-Type: application/json" \4--data '{5"method": "eth_getUncleCountByBlockHash",6"params": [7"0x3e56c97d34f03b1369c351fa6c9f57c8bfa987c7da40964fab981303e0ef5849"8],9"id": 1,10"jsonrpc": "2.0"11}'12
1curl https://docs-demo.avalanche-mainnet.quiknode.pro \2-X POST \3-H "Content-Type: application/json" \4--data '{5"method": "eth_getUncleCountByBlockHash",6"params": [7"0x3e56c97d34f03b1369c351fa6c9f57c8bfa987c7da40964fab981303e0ef5849"8],9"id": 1,10"jsonrpc": "2.0"11}'12
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider(4"https://docs-demo.avalanche-mainnet.quiknode.pro"5);6const uncleCount = await provider.send("eth_getUncleCountByBlockHash", [7"0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b",8]);9console.log(uncleCount);10})();11
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider(4"https://docs-demo.avalanche-mainnet.quiknode.pro"5);6const uncleCount = await provider.send("eth_getUncleCountByBlockHash", [7"0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b",8]);9console.log(uncleCount);10})();11
1출처: web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.avalanche-mainnet.quiknode.pro'))3print (w3.eth.get_uncle_count('0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b'))
1출처: web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.avalanche-mainnet.quiknode.pro'))3print (w3.eth.get_uncle_count('0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b'))