avm.getTx RPC Method
參數
txID
String
必填
載入中...
encoding
String
載入中...
退貨
tx
Object
載入中...
encoding
字串
載入中...
請求
1curl --location --request POST https://docs-demo.avalanche-mainnet.quiknode.pro \2--標頭 'Content-Type: application/json' \3--data-raw '{4"jsonrpc": "2.0",5"id": 1,6"method": "avm.getTx",7"params": {8"txID": "9VBHzPDFeDBJGyhBbzakzXMHJnsYhyLEiSS6ee5AczR2oJcns",9"encoding": "hex"10}11}'
1curl --location --request POST https://docs-demo.avalanche-mainnet.quiknode.pro \2--標頭 'Content-Type: application/json' \3--data-raw '{4"jsonrpc": "2.0",5"id": 1,6"method": "avm.getTx",7"params": {8"txID": "9VBHzPDFeDBJGyhBbzakzXMHJnsYhyLEiSS6ee5AczR2oJcns",9"encoding": "hex"10}11}'
1import { ethers } from "ethers";23(async () => {4const provider = new ethers.JsonRpcProvider(5"https://docs-demo.avalanche-mainnet.quiknode.pro"6);7const params = {8"txID": "9VBHzPDFeDBJGyhBbzakzXMHJnsYhyLEiSS6ee5AczR2oJcns",9"encoding": "hex",10};11const result = await provider.send("avm.getTx", params);12console.log(result);13})();14
1import { ethers } from "ethers";23(async () => {4const provider = new ethers.JsonRpcProvider(5"https://docs-demo.avalanche-mainnet.quiknode.pro"6);7const params = {8"txID": "9VBHzPDFeDBJGyhBbzakzXMHJnsYhyLEiSS6ee5AczR2oJcns",9"encoding": "hex",10};11const result = await provider.send("avm.getTx", params);12console.log(result);13})();14
1出自 web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.avalanche-mainnet.quiknode.pro'))3params = {4"txID":"9VBHzPDFeDBJGyhBbzakzXMHJnsYhyLEiSS6ee5AczR2oJcns",5"encoding": "hex"6}7request = w3.provider.make_request('avm.getTx', [params])8print(request)9
1出自 web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.avalanche-mainnet.quiknode.pro'))3params = {4"txID":"9VBHzPDFeDBJGyhBbzakzXMHJnsYhyLEiSS6ee5AczR2oJcns",5"encoding": "hex"6}7request = w3.provider.make_request('avm.getTx', [params])8print(request)9