eth_estimateExecutionGas RPC Method
पैरामीटर
वस्तु
वस्तु
लोड हो रहा है...
से
डोरी
लोड हो रहा है...
को
डोरी
आवश्यक
लोड हो रहा है...
गैस
डोरी
लोड हो रहा है...
गैस की कीमत
डोरी
लोड हो रहा है...
कीमत
डोरी
लोड हो रहा है...
डेटा
डोरी
लोड हो रहा है...
ब्लॉक संख्या/टैग
डोरी
आवश्यक
लोड हो रहा है...
रिटर्न
quantity
लोड हो रहा है...
अनुरोध
1curl -X POST "https://docs-demo.optimism.quiknode.pro/" \2-एच "Content-Type: application/json" \3-डी '{4"jsonrpc": "2.0",5"method": "eth_estimateExecutionGas",6"पैरामीटर": [7{8"to": "0x6b175474e89094c44da98b954eedeac495271d0f",9"gas": "0x7a120",10"gasPrice": "0x0",11"value": "0x0",12"डेटा": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"13},14"नवीनतम"15],16"आईडी": 117}'
1curl -X POST "https://docs-demo.optimism.quiknode.pro/" \2-एच "Content-Type: application/json" \3-डी '{4"jsonrpc": "2.0",5"method": "eth_estimateExecutionGas",6"पैरामीटर": [7{8"to": "0x6b175474e89094c44da98b954eedeac495271d0f",9"gas": "0x7a120",10"gasPrice": "0x0",11"value": "0x0",12"डेटा": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"13},14"नवीनतम"15],16"आईडी": 117}'
1import { ethers } from "ethers";23अतुल्यकालिक समारोह मुख्य ( ) {4const provider = new ethers.JsonRpcProvider("https://docs-demo.optimism.quiknode.pro/");5const response = await provider.send("eth_estimateExecutionGas", [6{7"to": "0x6b175474e89094c44da98b954eedeac495271d0f",8"gas": "0x7a120",9"gasPrice": "0x0",10"कीमत" : "0x0" ,11"डेटा" : "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"12} ,13"नवीनतम"14] ) ;15कंसोल.लॉग ( प्रतिक्रिया ) ;16}1718मुख्य ( ) ;
1import { ethers } from "ethers";23अतुल्यकालिक समारोह मुख्य ( ) {4const provider = new ethers.JsonRpcProvider("https://docs-demo.optimism.quiknode.pro/");5const response = await provider.send("eth_estimateExecutionGas", [6{7"to": "0x6b175474e89094c44da98b954eedeac495271d0f",8"gas": "0x7a120",9"gasPrice": "0x0",10"कीमत" : "0x0" ,11"डेटा" : "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"12} ,13"नवीनतम"14] ) ;15कंसोल.लॉग ( प्रतिक्रिया ) ;16}1718मुख्य ( ) ;
1from web3 import Web3 , HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.optimism.quiknode.pro/'))3response = w3.provider.make_request("eth_estimateExecutionGas", [{"to":"0x6b175474e89094c44da98b954eedeac495271d0f","gas":"0x7a120","gasPrice":"0x0","value":"0x0","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"},"latest"])4प्रिंट ( प्रतिक्रिया )
1from web3 import Web3 , HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.optimism.quiknode.pro/'))3response = w3.provider.make_request("eth_estimateExecutionGas", [{"to":"0x6b175474e89094c44da98b954eedeac495271d0f","gas":"0x7a120","gasPrice":"0x0","value":"0x0","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"},"latest"])4प्रिंट ( प्रतिक्रिया )
1आयात { createPublicClient , http } से 'विएम'23अतुल्यकालिक समारोह मुख्य ( ) {4स्थिर ग्राहक = createPublicClient ( {5transport: http('https://docs-demo.optimism.quiknode.pro/')6} )78स्थिर परिणाम = await क्लाइंट.अनुरोध ( {9method: 'eth_estimateExecutionGas',10पैरामीटर : [11{12"to": "0x6b175474e89094c44da98b954eedeac495271d0f",13"gas": "0x7a120",14"gasPrice": "0x0",15"value": "0x0",16"डेटा" : "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"17} ,18"नवीनतम"19]20} )2122कंसोल.लॉग ( परिणाम )23}2425मुख्य ( )
1आयात { createPublicClient , http } से 'विएम'23अतुल्यकालिक समारोह मुख्य ( ) {4स्थिर ग्राहक = createPublicClient ( {5transport: http('https://docs-demo.optimism.quiknode.pro/')6} )78स्थिर परिणाम = await क्लाइंट.अनुरोध ( {9method: 'eth_estimateExecutionGas',10पैरामीटर : [11{12"to": "0x6b175474e89094c44da98b954eedeac495271d0f",13"gas": "0x7a120",14"gasPrice": "0x0",15"value": "0x0",16"डेटा" : "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"17} ,18"नवीनतम"19]20} )2122कंसोल.लॉग ( परिणाम )23}2425मुख्य ( )
1आयात { मुख्य } से '@quicknode/sdk'23स्थिर कोर = नया मुख्य ( {4endpointUrl: "https://docs-demo.optimism.quiknode.pro/",5} )67कोर . क्लाइंट8। अनुरोध ( {9method: 'eth_estimateExecutionGas',10params: [{"to":"0x6b175474e89094c44da98b954eedeac495271d0f","gas":"0x7a120","gasPrice":"0x0","value":"0x0","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"},"latest"]11} )12फिर ( res => कंसोल.लॉग ( res ) )
1आयात { मुख्य } से '@quicknode/sdk'23स्थिर कोर = नया मुख्य ( {4endpointUrl: "https://docs-demo.optimism.quiknode.pro/",5} )67कोर . क्लाइंट8। अनुरोध ( {9method: 'eth_estimateExecutionGas',10params: [{"to":"0x6b175474e89094c44da98b954eedeac495271d0f","gas":"0x7a120","gasPrice":"0x0","value":"0x0","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"},"latest"]11} )12फिर ( res => कंसोल.लॉग ( res ) )
1स्थिर शरीर = {2jsonrpc : '2.0' ,3method: 'eth_estimateExecutionGas',4params: [{"to":"0x6b175474e89094c44da98b954eedeac495271d0f","gas":"0x7a120","gasPrice":"0x0","value":"0x0","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"},"latest"],5पहचान : 16}78अतुल्यकालिक समारोह मुख्य ( ) {9const response = await fetch('https://docs-demo.optimism.quiknode.pro/', {10तरीका : 'डाक' ,11headers: {'Content-Type': 'application/json'},12शरीर : JSON.stringify ( body )13} )14स्थिर डेटा = await response.json ( )15कंसोल.लॉग ( डेटा )16}1718मुख्य ( )
1स्थिर शरीर = {2jsonrpc : '2.0' ,3method: 'eth_estimateExecutionGas',4params: [{"to":"0x6b175474e89094c44da98b954eedeac495271d0f","gas":"0x7a120","gasPrice":"0x0","value":"0x0","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"},"latest"],5पहचान : 16}78अतुल्यकालिक समारोह मुख्य ( ) {9const response = await fetch('https://docs-demo.optimism.quiknode.pro/', {10तरीका : 'डाक' ,11headers: {'Content-Type': 'application/json'},12शरीर : JSON.stringify ( body )13} )14स्थिर डेटा = await response.json ( )15कंसोल.लॉग ( डेटा )16}1718मुख्य ( )
1आयात अनुरोध2आयात करें json34url = "https://docs-demo.optimism.quiknode.pro/"56पेलोड = json . डंप्स ( {7"jsonrpc" : "2.0" ,8"method": "eth_estimateExecutionGas",9"पैरामीटर" : [10{11"to": "0x6b175474e89094c44da98b954eedeac495271d0f",12"gas": "0x7a120",13"gasPrice": "0x0",14"value": "0x0",15"डेटा" : "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"16} ,17"नवीनतम"18] ,19"पहचान" : 120} )21हेडर = {22'सामग्री प्रकार' : 'एप्लिकेशन/जेसन'23}2425प्रतिक्रिया = अनुरोध.अनुरोध ( " POST " , यूआरएल , हेडर = हेडर , डेटा = पेलोड )2627प्रिंट ( प्रतिक्रिया . पाठ )
1आयात अनुरोध2आयात करें json34url = "https://docs-demo.optimism.quiknode.pro/"56पेलोड = json . डंप्स ( {7"jsonrpc" : "2.0" ,8"method": "eth_estimateExecutionGas",9"पैरामीटर" : [10{11"to": "0x6b175474e89094c44da98b954eedeac495271d0f",12"gas": "0x7a120",13"gasPrice": "0x0",14"value": "0x0",15"डेटा" : "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"16} ,17"नवीनतम"18] ,19"पहचान" : 120} )21हेडर = {22'सामग्री प्रकार' : 'एप्लिकेशन/जेसन'23}2425प्रतिक्रिया = अनुरोध.अनुरोध ( " POST " , यूआरएल , हेडर = हेडर , डेटा = पेलोड )2627प्रिंट ( प्रतिक्रिया . पाठ )
1ज़रूरत होना "उरी"2ज़रूरत होना "जेसन"3ज़रूरत होना "नेट/http"45uri = URI("https://docs-demo.optimism.quiknode.pro/")67पेलोड = {8jsonrpc : "2.0" ,9पहचान : 1 ,10method: "eth_estimateExecutionGas",11params: [{"to":"0x6b175474e89094c44da98b954eedeac495271d0f","gas":"0x7a120","gasPrice":"0x0","value":"0x0","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"},"latest"]12}1314अनुरोध = नेट :: एचटीटीपी :: पोस्ट.नया ( यूआरआई )15अनुरोध [ "सामग्री-प्रकार" ] = "एप्लिकेशन/जेसन"16अनुरोध.बॉडी = JSON.generate ( पेलोड )1718प्रतिक्रिया = नेट :: एचटीटीपी.स्टार्ट ( यूआरआई.होस्ट , यूआरआई.पोर्ट , use_ssl : सत्य ) करना | http |19http.request ( request )20अंत2122प्रतिक्रिया देता है . शरीर
1ज़रूरत होना "उरी"2ज़रूरत होना "जेसन"3ज़रूरत होना "नेट/http"45uri = URI("https://docs-demo.optimism.quiknode.pro/")67पेलोड = {8jsonrpc : "2.0" ,9पहचान : 1 ,10method: "eth_estimateExecutionGas",11params: [{"to":"0x6b175474e89094c44da98b954eedeac495271d0f","gas":"0x7a120","gasPrice":"0x0","value":"0x0","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"},"latest"]12}1314अनुरोध = नेट :: एचटीटीपी :: पोस्ट.नया ( यूआरआई )15अनुरोध [ "सामग्री-प्रकार" ] = "एप्लिकेशन/जेसन"16अनुरोध.बॉडी = JSON.generate ( पेलोड )1718प्रतिक्रिया = नेट :: एचटीटीपी.स्टार्ट ( यूआरआई.होस्ट , यूआरआई.पोर्ट , use_ssl : सत्य ) करना | http |19http.request ( request )20अंत2122प्रतिक्रिया देता है . शरीर
प्रतिक्रिया
1{2"jsonrpc" : "2.0" ,3"पहचान" : 1 ,4"result": "0x5208"5}
1{2"jsonrpc" : "2.0" ,3"पहचान" : 1 ,4"result": "0x5208"5}
अब तक कोई खाता नहीं है?
कुछ ही सेकंड में अपना क्विकनोड एंडपॉइंट बनाएं और निर्माण शुरू करें।
मुफ़्त में शुरुआत करें