So I heard that the precompiled contracts perform functions that are difficult to do using EVM opcodes. Does that mean the precompiled contracts are not written in EVM opcodes. Which language are precompiled contracts written in and how are they integrated into Ethereum?

2 Answers 2


Precompiled contracts aren't written in a particular language.

Usually someone proposes a new precompiled contract and suggest a possible implementation. It can be written in any language, python for example, the idea is the details and behavior are clear.

Once it is reviewed by the community and there's an agreement to adopt it. Each major client will develop its own implementation. Sometimes they'll use an external library written in assembly/C for performance reasons, others they will implement in the same language used by the client.


You can checkout the reference to go-ethereum's implementation of precompiled contracts here https://github.com/ethereum/go-ethereum/blob/master/core/vm/contracts.go

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.