Manuelles Senden über Testnet – Fehler: Überschreitet die Blockgasgrenze

Ich habe versucht zu folgen: https://github.com/ThatOtherZach/Web3-by-Example/wiki/Send-Ether-Transaction , um meine erste Transaktion im Ethereum-Testnet Rinkeby zu erstellen und zu übertragen.

Ich kämpfe jedoch stundenlang, nachdem ich es geschafft habe, eine Adresse zu erstellen und zu finanzieren ( https://rinkeby.etherscan.io/address/0x24003FbB79cfA541eE32C59ef3A7424541f4AA01 ). Ich habe auch das Ropsten-Testnetz ausprobiert, und zwar mit allen möglichen gasPrice/gasLimit-Kombinationen (nicht einmal das Auskommentieren hilft), aber die ganze Zeit dieselben Fehler:

Fehler: Zurückgegebener Fehler: überschreitet Blockgasgrenze

Mein Code:

 // Add the web3 node module
var Web3 = require('web3');

// Show web3 where it needs to look for the Ethereum node.
web3 = new Web3(new Web3.providers.HttpProvider('https://rinkeby.infura.io/Whm5Ks3VGzJMBGHh4MEx'));

// An extra module is required for this, use npm to install before running
var Tx = require('ethereumjs-tx');

// Used to sign the transaction. Obviously you SHOULD better secure this than just plain text
var privateKey = new Buffer('265f303edd16be057608a0810414c2889c24e7ce8e9e4a88ae5b8a561c26935a', 'hex');

 // The receiving address of the transaction
var receivingAddr = ('0x29307EE93F49E9eB1425e40C9119b9Cb6e39d9B5');

// Value to be sent, converted to wei and then into a hex value
var txValue = web3.utils.numberToHex(web3.utils.toWei('0.001', 'ether'));
console.log(txValue);
// Data to be sent in transaction, converted into a hex value. Normal tx's do not need this and use '0x' as default, but who wants to be normal?
var txData = web3.utils.asciiToHex('hi'); 

console.log('gasprice1');



var rawTx = {
  nonce: '1', // Nonce is the times the address has transacted, should always be higher than the last nonce 0x0#
  gasPrice: '0x38d7ea4c68000', // '0x14f46b0400', // Normal is '0x14f46b0400' or 90 GWei
  gasLimit: '2100000', //'0x2710', // Limit to be used by the transaction, default is '0x55f0' or 22000 GWei
  to: receivingAddr, // The receiving address of this transaction
  value: txValue, // The value we are sending '0x16345785d8a0000' which is 0.1 Ether
  data: txData // The data to be sent with transaction, '0x6f6820686169206d61726b' or 'oh hai mark' 
}

console.log(rawTx); // This is used for testing to see if the rawTx was formmated created properly, comment out the code below to use.


var tx = new Tx(rawTx);
tx.sign(privateKey); // Here we sign the transaction with the private key

var serializedTx = tx.serialize(); // Clean things up a bit

console.log(serializedTx.toString('hex')); // Log the resulting raw transaction hex for debugging if it fails to send

web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex')) // Broadcast the transaction to the network
.on('receipt', console.log); // When a receipt is issued, log it to the console

Wenn ich die Werte von https://github.com/ethereumjs/ethereumjs-tx verwende gasPrice: '0x09184e72a000', gasLimit: '0x2710', bekomme ich: Error: Returned error: intrinsic gas too low

Following error with this setup: { nonce: '0x00', gasPrice: '0x09184e72a000', gasLimit: '0x2710', from: '0xED54EbBC73C7fb8B6607547b7541D8799708D93B', to: '0xB29d0bDe21FF7f1a89eBEd0D9c40cA9f71119D7C', value: '0x38d7ea4c68000', chainId: '3', data : '0x737072656164' }

Fehler: Zurückgegebener Fehler: Unzureichende Mittel für Gas * Preis + Wert

Starten Sie diesen Code mit „node C:/Programs/code_snippets/create-wallet.js“.
Geändert gasPrice: '0x38d7ea4c68000', gasLimit: '2100000', TO gasPrice: web3.utils.toHex(20000000000), gasLimit: web3.utils.toHex(800000), ´ Jetzt passiert nichts, kein Fehler nein nichts :

Antworten (1)

Geändert gasPrice: '0x38d7ea4c68000', gasLimit: '2100000', TO gasPrice: web3.utils.toHex(20000000000), gasLimit: web3.utils.toHex(800000), ´ Jetzt funktioniert es!