-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sign function does not work correctly #27
Labels
good first issue
Good for newcomers
Comments
I'm not sure whether the issue is, but it looks like some number was too big so the X is out of limit. Did you use 32 bytes of private key (do not paste key here)? |
This was referenced Nov 14, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I used this library to test sendRawTransaction.
But I am getting this error - "transaction could not be decoded: could not recover from address: could not recover secp256k1 key: calculated Rx is larger than curve P" when I send signed transaction
f8ed01850861c46800827d0094d02a1ed82FA5091A5639dc507f2F6130E5Bc61Be80b8886139303539636262303030303030303030303030303030303030303030303030326130383566313530646638333639306165353232653933616136336530363466646166303439303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030343824a0bb8e9387f97cca50d0193bbbc57ebd1071156ed539e89beeeb73e104f8d01df0a07ada6542d9d29dc0c238ce54df923a35995f830f476b2b60167b72a6bbdf793d
This is my signed transaction by using transaction->sign() function
In my view, this result is wrong.
$eth->getTransactionCount($fromAccount, 'pending', function($err, $nonce) use ($eth, $fromAccount, $data) {
$rawTransaction = new Web3Transaction([
"from" => $fromAccount,
"gasPrice" => '0x861c46800',
"gasLimit" => '0x7d00',
"to" => env('CONTRACT_ADDRESS'),
"value" => "0x0",
"data" => $data,
"chainID" => 1,
"nonce" => sprintf('0x%s', dechex(intval($nonce->toString())+1))
]);
$signedTx = $rawTransaction->sign(env('COMPANY_PRIVATE_KEY'));
Log::debug($signedTx);
$eth->sendRawTransaction(sprintf('0x%s', $signedTx), function ($err, $tx) {
if ($err !== null) {
Log::debug("Error: " . $err->getMessage());
}
Log::debug('TX: ' . $tx);
});
});
This is my code to get the result.
Anyone can help me with this issue?
The text was updated successfully, but these errors were encountered: