eth_signTransaction RPC メソッド
パラメータ
オブジェクト
オブジェクト
必須
読み込み中...
出典:
文字列
必須
読み込み中...
~へ
文字列
必須
読み込み中...
ガス
文字列
読み込み中...
gasPrice
文字列
読み込み中...
値
文字列
読み込み中...
データ
文字列
読み込み中...
ノンス
文字列
読み込み中...
返品
結果
文字列
読み込み中...
リクエスト
1curl -X POST "https://docs-demo.optimism.quiknode.pro/" \2-H "Content-Type: application/json" \3-d '{4"jsonrpc": "2.0",5"method": "eth_signTransaction",6"params": [7{8"from": "0x0000000000000000000000000000000000000000",9"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",10"gas": "0x76c0",11"gasPrice": "0x9184e72a000",12"value": "0x9184e72a",13"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",14"nonce": "0x1"15}16],17"id": 118}'
1curl -X POST "https://docs-demo.optimism.quiknode.pro/" \2-H "Content-Type: application/json" \3-d '{4"jsonrpc": "2.0",5"method": "eth_signTransaction",6"params": [7{8"from": "0x0000000000000000000000000000000000000000",9"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",10"gas": "0x76c0",11"gasPrice": "0x9184e72a000",12"value": "0x9184e72a",13"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",14"nonce": "0x1"15}16],17"id": 118}'
1import { ethers } from "ethers";23async 関数 main() {4const provider = new ethers.JsonRpcProvider("https://docs-demo.optimism.quiknode.pro/");5const response = await provider.send("eth_signTransaction", [6{7"from": "0x0000000000000000000000000000000000000000",8"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",9"gas": "0x76c0",10"gasPrice": "0x9184e72a000",11"value": "0x9184e72a",12"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",13"nonce": "0x1"14}15]);16コンソール.log(レスポンス);17}1819メイン();
1import { ethers } from "ethers";23async 関数 main() {4const provider = new ethers.JsonRpcProvider("https://docs-demo.optimism.quiknode.pro/");5const response = await provider.send("eth_signTransaction", [6{7"from": "0x0000000000000000000000000000000000000000",8"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",9"gas": "0x76c0",10"gasPrice": "0x9184e72a000",11"value": "0x9184e72a",12"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",13"nonce": "0x1"14}15]);16コンソール.log(レスポンス);17}1819メイン();
1出典: web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.optimism.quiknode.pro/'))3response = w3.provider.make_request("eth_signTransaction", [{"from":"0x0000000000000000000000000000000000000000","to":"0x70997970c51812dc3a010c7d01b50e0d17dc79c8","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","nonce":"0x1"}])4印刷(レスポンス)
1出典: web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.optimism.quiknode.pro/'))3response = w3.provider.make_request("eth_signTransaction", [{"from":"0x0000000000000000000000000000000000000000","to":"0x70997970c51812dc3a010c7d01b50e0d17dc79c8","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","nonce":"0x1"}])4印刷(レスポンス)
1import { createPublicClient, http } from 'viem'23async 関数 main() {4const クライアント = createPublicClient({5transport: http('https://docs-demo.optimism.quiknode.pro/')6})78const result = await client.リクエスト({9method: 'eth_signTransaction',10params: [11{12"from": "0x0000000000000000000000000000000000000000",13"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",14"gas": "0x76c0",15"gasPrice": "0x9184e72a000",16"value": "0x9184e72a",17"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",18"nonce": "0x1"19}20]21})2223コンソール.log(結果)24}2526メイン()
1import { createPublicClient, http } from 'viem'23async 関数 main() {4const クライアント = createPublicClient({5transport: http('https://docs-demo.optimism.quiknode.pro/')6})78const result = await client.リクエスト({9method: 'eth_signTransaction',10params: [11{12"from": "0x0000000000000000000000000000000000000000",13"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",14"gas": "0x76c0",15"gasPrice": "0x9184e72a000",16"value": "0x9184e72a",17"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",18"nonce": "0x1"19}20]21})2223コンソール.log(結果)24}2526メイン()
1import { Core } from '@quicknode/sdk'23const コア = new Core({4endpointUrl: "https://docs-demo.optimism.quiknode.pro/",5})67コア.クライアント8.リクエスト({9method: 'eth_signTransaction',10params: [{"from":"0x0000000000000000000000000000000000000000","to":"0x70997970c51812dc3a010c7d01b50e0d17dc79c8","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","nonce":"0x1"}]11})12.その後(res => console.log(res))
1import { Core } from '@quicknode/sdk'23const コア = new Core({4endpointUrl: "https://docs-demo.optimism.quiknode.pro/",5})67コア.クライアント8.リクエスト({9method: 'eth_signTransaction',10params: [{"from":"0x0000000000000000000000000000000000000000","to":"0x70997970c51812dc3a010c7d01b50e0d17dc79c8","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","nonce":"0x1"}]11})12.その後(res => console.log(res))
1const body = {2jsonrpc: '2.0',3method: 'eth_signTransaction',4params: [{"from":"0x0000000000000000000000000000000000000000","to":"0x70997970c51812dc3a010c7d01b50e0d17dc79c8","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","nonce":"0x1"}],5id: 16}78async 関数 main() {9const response = await fetch('https://docs-demo.optimism.quiknode.pro/', {10メソッド: 'POST',11headers: {'Content-Type': 'application/json'},12本文: JSON.stringify(body)13})14const データ = await response.json()15コンソール.log(データ)16}1718メイン()
1const body = {2jsonrpc: '2.0',3method: 'eth_signTransaction',4params: [{"from":"0x0000000000000000000000000000000000000000","to":"0x70997970c51812dc3a010c7d01b50e0d17dc79c8","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","nonce":"0x1"}],5id: 16}78async 関数 main() {9const response = await fetch('https://docs-demo.optimism.quiknode.pro/', {10メソッド: 'POST',11headers: {'Content-Type': 'application/json'},12本文: JSON.stringify(body)13})14const データ = await response.json()15コンソール.log(データ)16}1718メイン()
1import リクエスト2import json34url = "https://docs-demo.optimism.quiknode.pro/"56ペイロード = json.dumps({7"jsonrpc": "2.0",8"method": "eth_signTransaction",9"params": [10{11"from": "0x0000000000000000000000000000000000000000",12"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",13"gas": "0x76c0",14"gasPrice": "0x9184e72a000",15"value": "0x9184e72a",16"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",17"nonce": "0x1"18}19],20"id": 121})22ヘッダー = {23「Content-Type」: 'application/json'24}2526回答 = リクエスト.リクエスト("POST", url, headers=headers, データ=ペイロード)2728印刷(レスポンス.text)
1import リクエスト2import json34url = "https://docs-demo.optimism.quiknode.pro/"56ペイロード = json.dumps({7"jsonrpc": "2.0",8"method": "eth_signTransaction",9"params": [10{11"from": "0x0000000000000000000000000000000000000000",12"to": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",13"gas": "0x76c0",14"gasPrice": "0x9184e72a000",15"value": "0x9184e72a",16"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",17"nonce": "0x1"18}19],20"id": 121})22ヘッダー = {23「Content-Type」: 'application/json'24}2526回答 = リクエスト.リクエスト("POST", url, headers=headers, データ=ペイロード)2728印刷(レスポンス.text)
1require "uri"2require "json"3require "net/http"45uri = URI("https://docs-demo.optimism.quiknode.pro/")67ペイロード = {8jsonrpc: "2.0",9id: 1,10method: "eth_signTransaction",11params: [{"from":"0x0000000000000000000000000000000000000000","to":"0x70997970c51812dc3a010c7d01b50e0d17dc79c8","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","nonce":"0x1"}]12}1314リクエスト = ネット::HTTP::POST.new(URI)15リクエスト["Content-Type"] = "application/json"16リクエスト.本文 = JSON.generate(ペイロード)1718回答 = ネット::HTTP.開始(uri.host, uri.port, use_ssl: true) do |http|19http.リクエスト(リクエスト)20終わり2122レスポンスを格納する。body
1require "uri"2require "json"3require "net/http"45uri = URI("https://docs-demo.optimism.quiknode.pro/")67ペイロード = {8jsonrpc: "2.0",9id: 1,10method: "eth_signTransaction",11params: [{"from":"0x0000000000000000000000000000000000000000","to":"0x70997970c51812dc3a010c7d01b50e0d17dc79c8","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","nonce":"0x1"}]12}1314リクエスト = ネット::HTTP::POST.new(URI)15リクエスト["Content-Type"] = "application/json"16リクエスト.本文 = JSON.generate(ペイロード)1718回答 = ネット::HTTP.開始(uri.host, uri.port, use_ssl: true) do |http|19http.リクエスト(リクエスト)20終わり2122レスポンスを格納する。body
回答
1{2"jsonrpc": "2.0",3"id": 1,4"result": "0xf86b808502540be4008252089470997970c51812dc3a010c7d01b50e0d17dc79c8872386f26fc1000080820a96a0d29b498ef49e9dd94a5e0e3ec6eccd85c21edcee32dc4d12a3b3e4a1c2c30e1a06c3b15e13e0bffa8f6de1f5e1e0c3d7ed3f3d6fccfe0a2e9c0d4b3a8c7f1e2b9"5}
1{2"jsonrpc": "2.0",3"id": 1,4"result": "0xf86b808502540be4008252089470997970c51812dc3a010c7d01b50e0d17dc79c8872386f26fc1000080820a96a0d29b498ef49e9dd94a5e0e3ec6eccd85c21edcee32dc4d12a3b3e4a1c2c30e1a06c3b15e13e0bffa8f6de1f5e1e0c3d7ed3f3d6fccfe0a2e9c0d4b3a8c7f1e2b9"5}