starknet_addDeclareTransaction RPC Method
Parâmetros
declare_transaction
objeto
OBRIGATÓRIO
Carregando...
tipo
cadeia de caracteres
OBRIGATÓRIO
Carregando...
sender_address
cadeia de caracteres
OBRIGATÓRIO
Carregando...
compiled_class_hash
cadeia de caracteres
OBRIGATÓRIO
Carregando...
versão
cadeia de caracteres
OBRIGATÓRIO
Carregando...
signature
cadeia de caracteres
OBRIGATÓRIO
Carregando...
nonce
cadeia de caracteres
OBRIGATÓRIO
Carregando...
contract_class
objeto
OBRIGATÓRIO
Carregando...
sierra_program
matriz
OBRIGATÓRIO
Carregando...
contract_class_version
cadeia de caracteres
OBRIGATÓRIO
Carregando...
entry_points_by_type
objeto
OBRIGATÓRIO
Carregando...
CONSTRUCTOR
matriz
OBRIGATÓRIO
Carregando...
selector
cadeia de caracteres
OBRIGATÓRIO
Carregando...
function_idx
número inteiro
OBRIGATÓRIO
Carregando...
EXTERNAL
matriz
OBRIGATÓRIO
Carregando...
selector
cadeia de caracteres
OBRIGATÓRIO
Carregando...
function_idx
número inteiro
OBRIGATÓRIO
Carregando...
L1_HANDLER
matriz
OBRIGATÓRIO
Carregando...
selector
cadeia de caracteres
OBRIGATÓRIO
Carregando...
function_idx
número inteiro
OBRIGATÓRIO
Carregando...
abi
cadeia de caracteres
Carregando...
resource_bounds
objeto
OBRIGATÓRIO
Carregando...
l1_gas
objeto
OBRIGATÓRIO
Carregando...
max_amount
cadeia de caracteres
OBRIGATÓRIO
Carregando...
max_price_per_unit
cadeia de caracteres
OBRIGATÓRIO
Carregando...
l1_data_gas
objeto
OBRIGATÓRIO
Carregando...
max_amount
cadeia de caracteres
OBRIGATÓRIO
Carregando...
max_price_per_unit
cadeia de caracteres
OBRIGATÓRIO
Carregando...
l2_gas
objeto
OBRIGATÓRIO
Carregando...
max_amount
cadeia de caracteres
OBRIGATÓRIO
Carregando...
max_price_per_unit
cadeia de caracteres
OBRIGATÓRIO
Carregando...
dica
cadeia de caracteres
OBRIGATÓRIO
Carregando...
paymaster_data
matriz
OBRIGATÓRIO
Carregando...
account_deployment_data
matriz
OBRIGATÓRIO
Carregando...
nonce_data_availability_mode
cadeia de caracteres
OBRIGATÓRIO
Carregando...
fee_data_availability_mode
cadeia de caracteres
OBRIGATÓRIO
Carregando...
Devoluções
resultado
objeto
Carregando...
transaction_hash
cadeia de caracteres
Carregando...
class_hash
cadeia de caracteres
Carregando...
Pedido
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_9 for version 0.9. Versions 0.6, 0.7, and 0.8 are no longer supported3curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_9' \4--header 'accept: application/json' \5--header 'content-type: application/json' \6--dados '{7"id": 1,8"jsonrpc": "2.0",9"method": "starknet_addDeclareTransaction",10"params": [11{12"type": "DECLARE",13"version": "0x3",14"sender_address": "0x4678eb497e96599c92b45f342c2bd284321fe219c60a9b6293d80f0fbfa61b5",15"signature": [16"0x7cfaae050d6db02b32ddbdb85989e10012504e74b680c9807386f9a1c8807c6",17"0x6e76b70ec1a32a3871516fc500c7478c02287783d075a0fdad6a659b4d2a8c4"18],19"nonce": "0x1",20"compiled_class_hash": "0x6ff9f7df06da94198ee535f9fee21f9b0dcd2e51a4b5bdfa5b4e5b6b3e78ecb",21"contract_class": {22"sierra_program": [23"0x1",24"0x5",25"0x0",26"0x0",27"0x0",28"0x0"29],30"contract_class_version": "0.1.0",31"entry_points_by_type": {32"CONSTRUCTOR": [33{34"selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",35"function_idx": 036}37],38"EXTERNAL": [39{40"selector": "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e",41"function_idx": 142}43],44"L1_HANDLER": []45},46"abi": "[{\"type\": \"function\", \"name\": \"transfer\", \"inputs\": [], \"outputs\": []}]"47},48"resource_bounds": {49"l1_gas": {50"max_amount": "0x0",51"max_price_per_unit": "0x38d7ea4c68000"52},53"l1_data_gas": {54"max_amount": "0x1388",55"max_price_per_unit": "0x9184e72a000"56},57"l2_gas": {58"max_amount": "0x7270e00",59"max_price_per_unit": "0x174876e800"60}61},62"tip": "0x0",63"paymaster_data": [],64"account_deployment_data": [],65"nonce_data_availability_mode": "L1",66"fee_data_availability_mode": "L1"67}68]69}'
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_9 for version 0.9. Versions 0.6, 0.7, and 0.8 are no longer supported3curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_9' \4--header 'accept: application/json' \5--header 'content-type: application/json' \6--dados '{7"id": 1,8"jsonrpc": "2.0",9"method": "starknet_addDeclareTransaction",10"params": [11{12"type": "DECLARE",13"version": "0x3",14"sender_address": "0x4678eb497e96599c92b45f342c2bd284321fe219c60a9b6293d80f0fbfa61b5",15"signature": [16"0x7cfaae050d6db02b32ddbdb85989e10012504e74b680c9807386f9a1c8807c6",17"0x6e76b70ec1a32a3871516fc500c7478c02287783d075a0fdad6a659b4d2a8c4"18],19"nonce": "0x1",20"compiled_class_hash": "0x6ff9f7df06da94198ee535f9fee21f9b0dcd2e51a4b5bdfa5b4e5b6b3e78ecb",21"contract_class": {22"sierra_program": [23"0x1",24"0x5",25"0x0",26"0x0",27"0x0",28"0x0"29],30"contract_class_version": "0.1.0",31"entry_points_by_type": {32"CONSTRUCTOR": [33{34"selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",35"function_idx": 036}37],38"EXTERNAL": [39{40"selector": "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e",41"function_idx": 142}43],44"L1_HANDLER": []45},46"abi": "[{\"type\": \"function\", \"name\": \"transfer\", \"inputs\": [], \"outputs\": []}]"47},48"resource_bounds": {49"l1_gas": {50"max_amount": "0x0",51"max_price_per_unit": "0x38d7ea4c68000"52},53"l1_data_gas": {54"max_amount": "0x1388",55"max_price_per_unit": "0x9184e72a000"56},57"l2_gas": {58"max_amount": "0x7270e00",59"max_price_per_unit": "0x174876e800"60}61},62"tip": "0x0",63"paymaster_data": [],64"account_deployment_data": [],65"nonce_data_availability_mode": "L1",66"fee_data_availability_mode": "L1"67}68]69}'
1// Note: You can specify Starknet version in the URL path2// Example: /rpc/v0_9 for version 0.9. Versions 0.6, 0.7, and 0.8 are no longer supported3const myHeaders = new Headers();4myHeaders.append("accept", "application/json");5myHeaders.append("content-type", "application/json");67const raw = JSON.stringify({8"id": 1,9"jsonrpc": "2.0",10"method": "starknet_addDeclareTransaction",11«params»: [12{13"type": "DECLARE",14"version": "0x3",15"sender_address": "0x4678eb497e96599c92b45f342c2bd284321fe219c60a9b6293d80f0fbfa61b5",16"signature": [17"0x7cfaae050d6db02b32ddbdb85989e10012504e74b680c9807386f9a1c8807c6",18"0x6e76b70ec1a32a3871516fc500c7478c02287783d075a0fdad6a659b4d2a8c4"19],20"nonce": "0x1",21"compiled_class_hash": "0x6ff9f7df06da94198ee535f9fee21f9b0dcd2e51a4b5bdfa5b4e5b6b3e78ecb",22"contract_class": {23"sierra_program": [24"0x1",25"0x5",26"0x0",27"0x0",28"0x0",29"0x0"30],31"contract_class_version": "0.1.0",32"entry_points_by_type": {33"CONSTRUCTOR": [34{35"selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",36"function_idx": 037}38],39"EXTERNAL": [40{41"selector": "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e",42"function_idx": 143}44],45"L1_HANDLER": []46},47"abi": "[{\"type\": \"function\", \"name\": \"transfer\", \"inputs\": [], \"outputs\": []}]"48},49"resource_bounds": {50"l1_gas": {51"max_amount": "0x0",52"max_price_per_unit": "0x38d7ea4c68000"53},54"l1_data_gas": {55"max_amount": "0x1388",56"max_price_per_unit": "0x9184e72a000"57},58"l2_gas": {59"max_amount": "0x7270e00",60"max_price_per_unit": "0x174876e800"61}62},63"tip": "0x0",64"paymaster_data": [],65"account_deployment_data": [],66"nonce_data_availability_mode": "L1",67"fee_data_availability_mode": "L1"68}69]70});7172const requestOptions = {73method: "POST",74cabeçalhos: myHeaders,75body: raw,76redirecionar: "seguir"77};7879fetch("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_9", requestOptions)80.então((resposta) => resposta.texto())81.então((resultado) => console.log(resultado))82.captura((erro) => console.erro(erro));
1// Note: You can specify Starknet version in the URL path2// Example: /rpc/v0_9 for version 0.9. Versions 0.6, 0.7, and 0.8 are no longer supported3const myHeaders = new Headers();4myHeaders.append("accept", "application/json");5myHeaders.append("content-type", "application/json");67const raw = JSON.stringify({8"id": 1,9"jsonrpc": "2.0",10"method": "starknet_addDeclareTransaction",11«params»: [12{13"type": "DECLARE",14"version": "0x3",15"sender_address": "0x4678eb497e96599c92b45f342c2bd284321fe219c60a9b6293d80f0fbfa61b5",16"signature": [17"0x7cfaae050d6db02b32ddbdb85989e10012504e74b680c9807386f9a1c8807c6",18"0x6e76b70ec1a32a3871516fc500c7478c02287783d075a0fdad6a659b4d2a8c4"19],20"nonce": "0x1",21"compiled_class_hash": "0x6ff9f7df06da94198ee535f9fee21f9b0dcd2e51a4b5bdfa5b4e5b6b3e78ecb",22"contract_class": {23"sierra_program": [24"0x1",25"0x5",26"0x0",27"0x0",28"0x0",29"0x0"30],31"contract_class_version": "0.1.0",32"entry_points_by_type": {33"CONSTRUCTOR": [34{35"selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",36"function_idx": 037}38],39"EXTERNAL": [40{41"selector": "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e",42"function_idx": 143}44],45"L1_HANDLER": []46},47"abi": "[{\"type\": \"function\", \"name\": \"transfer\", \"inputs\": [], \"outputs\": []}]"48},49"resource_bounds": {50"l1_gas": {51"max_amount": "0x0",52"max_price_per_unit": "0x38d7ea4c68000"53},54"l1_data_gas": {55"max_amount": "0x1388",56"max_price_per_unit": "0x9184e72a000"57},58"l2_gas": {59"max_amount": "0x7270e00",60"max_price_per_unit": "0x174876e800"61}62},63"tip": "0x0",64"paymaster_data": [],65"account_deployment_data": [],66"nonce_data_availability_mode": "L1",67"fee_data_availability_mode": "L1"68}69]70});7172const requestOptions = {73method: "POST",74cabeçalhos: myHeaders,75body: raw,76redirecionar: "seguir"77};7879fetch("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_9", requestOptions)80.então((resposta) => resposta.texto())81.então((resultado) => console.log(resultado))82.captura((erro) => console.erro(erro));
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_9 for version 0.9. Versions 0.6, 0.7, and 0.8 are no longer supported3import requests4import json56url = "https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_9"78carga útil = json.dumps({9"id": 1,10"jsonrpc": "2.0",11"method": "starknet_addDeclareTransaction",12«params»: [13{14"type": "DECLARE",15"version": "0x3",16"sender_address": "0x4678eb497e96599c92b45f342c2bd284321fe219c60a9b6293d80f0fbfa61b5",17"signature": [18"0x7cfaae050d6db02b32ddbdb85989e10012504e74b680c9807386f9a1c8807c6",19"0x6e76b70ec1a32a3871516fc500c7478c02287783d075a0fdad6a659b4d2a8c4"20],21"nonce": "0x1",22"compiled_class_hash": "0x6ff9f7df06da94198ee535f9fee21f9b0dcd2e51a4b5bdfa5b4e5b6b3e78ecb",23"contract_class": {24"sierra_program": [25"0x1",26"0x5",27"0x0",28"0x0",29"0x0",30"0x0"31],32"contract_class_version": "0.1.0",33"entry_points_by_type": {34"CONSTRUCTOR": [35{36"selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",37"function_idx": 038}39],40"EXTERNAL": [41{42"selector": "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e",43"function_idx": 144}45],46"L1_HANDLER": []47},48"abi": "[{\"type\": \"function\", \"name\": \"transfer\", \"inputs\": [], \"outputs\": []}]"49},50"resource_bounds": {51"l1_gas": {52"max_amount": "0x0",53"max_price_per_unit": "0x38d7ea4c68000"54},55"l1_data_gas": {56"max_amount": "0x1388",57"max_price_per_unit": "0x9184e72a000"58},59"l2_gas": {60"max_amount": "0x7270e00",61"max_price_per_unit": "0x174876e800"62}63},64"tip": "0x0",65"paymaster_data": [],66"account_deployment_data": [],67"nonce_data_availability_mode": "L1",68"fee_data_availability_mode": "L1"69}70]71})72cabeçalhos = {73«aceitar»: 'application/json',74'content-type': 'application/json'75}7677resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)7879imprimir(resposta.texto)80
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_9 for version 0.9. Versions 0.6, 0.7, and 0.8 are no longer supported3import requests4import json56url = "https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_9"78carga útil = json.dumps({9"id": 1,10"jsonrpc": "2.0",11"method": "starknet_addDeclareTransaction",12«params»: [13{14"type": "DECLARE",15"version": "0x3",16"sender_address": "0x4678eb497e96599c92b45f342c2bd284321fe219c60a9b6293d80f0fbfa61b5",17"signature": [18"0x7cfaae050d6db02b32ddbdb85989e10012504e74b680c9807386f9a1c8807c6",19"0x6e76b70ec1a32a3871516fc500c7478c02287783d075a0fdad6a659b4d2a8c4"20],21"nonce": "0x1",22"compiled_class_hash": "0x6ff9f7df06da94198ee535f9fee21f9b0dcd2e51a4b5bdfa5b4e5b6b3e78ecb",23"contract_class": {24"sierra_program": [25"0x1",26"0x5",27"0x0",28"0x0",29"0x0",30"0x0"31],32"contract_class_version": "0.1.0",33"entry_points_by_type": {34"CONSTRUCTOR": [35{36"selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",37"function_idx": 038}39],40"EXTERNAL": [41{42"selector": "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e",43"function_idx": 144}45],46"L1_HANDLER": []47},48"abi": "[{\"type\": \"function\", \"name\": \"transfer\", \"inputs\": [], \"outputs\": []}]"49},50"resource_bounds": {51"l1_gas": {52"max_amount": "0x0",53"max_price_per_unit": "0x38d7ea4c68000"54},55"l1_data_gas": {56"max_amount": "0x1388",57"max_price_per_unit": "0x9184e72a000"58},59"l2_gas": {60"max_amount": "0x7270e00",61"max_price_per_unit": "0x174876e800"62}63},64"tip": "0x0",65"paymaster_data": [],66"account_deployment_data": [],67"nonce_data_availability_mode": "L1",68"fee_data_availability_mode": "L1"69}70]71})72cabeçalhos = {73«aceitar»: 'application/json',74'content-type': 'application/json'75}7677resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)7879imprimir(resposta.texto)80
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_9 for version 0.9. Versions 0.6, 0.7, and 0.8 are no longer supported3require "uri"4require "json"5necessita de "net/http"67url = URI("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_9")89http = Net::HTTP.new(url.host, url.port);10pedido = Líquido::HTTP::POST.novo(url)11request["accept"] = "application/json"12request["content-type"] = "application/json"13request.body = JSON.dump({14"id": 1,15"jsonrpc": "2.0",16"method": "starknet_addDeclareTransaction",17«params»: [18{19"type": "DECLARE",20"version": "0x3",21"sender_address": "0x4678eb497e96599c92b45f342c2bd284321fe219c60a9b6293d80f0fbfa61b5",22"signature": [23"0x7cfaae050d6db02b32ddbdb85989e10012504e74b680c9807386f9a1c8807c6",24"0x6e76b70ec1a32a3871516fc500c7478c02287783d075a0fdad6a659b4d2a8c4"25],26"nonce": "0x1",27"compiled_class_hash": "0x6ff9f7df06da94198ee535f9fee21f9b0dcd2e51a4b5bdfa5b4e5b6b3e78ecb",28"contract_class": {29"sierra_program": [30"0x1",31"0x5",32"0x0",33"0x0",34"0x0",35"0x0"36],37"contract_class_version": "0.1.0",38"entry_points_by_type": {39"CONSTRUCTOR": [40{41"selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",42"function_idx": 043}44],45"EXTERNAL": [46{47"selector": "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e",48"function_idx": 149}50],51"L1_HANDLER": []52},53"abi": "[{\"type\": \"function\", \"name\": \"transfer\", \"inputs\": [], \"outputs\": []}]"54},55"resource_bounds": {56"l1_gas": {57"max_amount": "0x0",58"max_price_per_unit": "0x38d7ea4c68000"59},60"l1_data_gas": {61"max_amount": "0x1388",62"max_price_per_unit": "0x9184e72a000"63},64"l2_gas": {65"max_amount": "0x7270e00",66"max_price_per_unit": "0x174876e800"67}68},69"tip": "0x0",70"paymaster_data": [],71"account_deployment_data": [],72"nonce_data_availability_mode": "L1",73"fee_data_availability_mode": "L1"74}75]76})7778resposta = http.pedido(pedido)79insere a resposta.read_body80
1# Note: You can specify Starknet version in the URL path2# Example: /rpc/v0_9 for version 0.9. Versions 0.6, 0.7, and 0.8 are no longer supported3require "uri"4require "json"5necessita de "net/http"67url = URI("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_9")89http = Net::HTTP.new(url.host, url.port);10pedido = Líquido::HTTP::POST.novo(url)11request["accept"] = "application/json"12request["content-type"] = "application/json"13request.body = JSON.dump({14"id": 1,15"jsonrpc": "2.0",16"method": "starknet_addDeclareTransaction",17«params»: [18{19"type": "DECLARE",20"version": "0x3",21"sender_address": "0x4678eb497e96599c92b45f342c2bd284321fe219c60a9b6293d80f0fbfa61b5",22"signature": [23"0x7cfaae050d6db02b32ddbdb85989e10012504e74b680c9807386f9a1c8807c6",24"0x6e76b70ec1a32a3871516fc500c7478c02287783d075a0fdad6a659b4d2a8c4"25],26"nonce": "0x1",27"compiled_class_hash": "0x6ff9f7df06da94198ee535f9fee21f9b0dcd2e51a4b5bdfa5b4e5b6b3e78ecb",28"contract_class": {29"sierra_program": [30"0x1",31"0x5",32"0x0",33"0x0",34"0x0",35"0x0"36],37"contract_class_version": "0.1.0",38"entry_points_by_type": {39"CONSTRUCTOR": [40{41"selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194",42"function_idx": 043}44],45"EXTERNAL": [46{47"selector": "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e",48"function_idx": 149}50],51"L1_HANDLER": []52},53"abi": "[{\"type\": \"function\", \"name\": \"transfer\", \"inputs\": [], \"outputs\": []}]"54},55"resource_bounds": {56"l1_gas": {57"max_amount": "0x0",58"max_price_per_unit": "0x38d7ea4c68000"59},60"l1_data_gas": {61"max_amount": "0x1388",62"max_price_per_unit": "0x9184e72a000"63},64"l2_gas": {65"max_amount": "0x7270e00",66"max_price_per_unit": "0x174876e800"67}68},69"tip": "0x0",70"paymaster_data": [],71"account_deployment_data": [],72"nonce_data_availability_mode": "L1",73"fee_data_availability_mode": "L1"74}75]76})7778resposta = http.pedido(pedido)79insere a resposta.read_body80
Ainda não tem uma conta?
Crieendpoint seuendpoint Quicknode endpoint segundos e comece a desenvolver
Comece gratuitamente