Should the precompile-addresses (0x1 .. 0xff) be pre-funded with 1 wei? (advisable yes)

What is the purpose of this, what are precompile-addresses?


2 Answers 2


...what are precompile-addresses?

The precompiles are a set of contracts that are used for computationally intensive operations that would cost too much gas to implement in the normal way.

There are currently 8 of them. They exist at addresses 0x...01 to 0x...09.

What is the purpose of this (message)...

(Slightly contrary to my original comment, which I've redacted.)

The message/question is output when instantiating a private network with Puppeth.

The Solidity docs have the following to say. Though only 3 precompiles are mentioned, the same applies to the other 5.

"When running sha256, ripemd160 or ecrecover on a private blockchain, you might encounter Out-of-Gas. This is because these functions are implemented as “precompiled contracts” and only really exist after they receive the first message (although their contract code is hardcoded). Messages to non-existing contracts are more expensive and thus the execution might run into an Out-of-Gas error. A workaround for this problem is to first send Wei (1 for example) to each of the contracts before you use them in your actual contracts. This is not an issue on the main or test net."

So basically you should answer "yes" to the option of pre-funding if you want to prevent OOG issues when calling the precompiles.


Pre-compiled contracts are implemented in the client nodes, they don't run inside the EVM. They are mainly used for cryptographic applications (the exception is the identity function, which I don't really know the purpose of).

I usually go to the EIP pages to find the gas costs. For example, for the 4 most recent pre-compiled contracts, these are the respective pages:

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-196.md https://github.com/ethereum/EIPs/blob/master/EIPS/eip-197.md https://github.com/ethereum/EIPs/blob/master/EIPS/eip-198.md

They may be buried as well inside the Yellow Paper, but if so they seem to be deep under the surface.

I've written a whole blog post about them (from the perspective of cryptographic pairings), which might be helpful to you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.