Skip to content

What are Precompiles?

Precompiles or Precompiled contracts are a unique category of smart contracts who functionariy incorporated directly into the EVM instead of executing as bytecode, each assigned a specific address. The gas fees for executing these contracts are predetermined. In Berachain, this is primarily used to enable deeper functionality on the chain that interacts directly with various Cosmos modules that otherwise would be inaccessible outside the EVM.

Examples

Ethereum Shanghai EVM Codes Precompiled

AddressNameMinimum GasInputOutputDescription
0x02SHA2-25660datahashHash function

Berachain Precompiles

AddressNameMinimum GasInputOutputDescription
0x4381dC2aB14285160c808659aEe005D51255adD7Bank Contract~send(address, Cosmos.Coin[])booleanTransfers/balances to Cosmos SDK Bank Module.

Berachain Precompiles

Berachain precompiles adopt some of Polaris' EVM precompile contracts while adding some additional ones for more functionality.

These precompiled contracts aid in the functionality of Proof-of-liquity and more, in the form of a native BEX, native oracle, governance, and more.

To see the full list of precomiled contracts, see Precompiles & Deployment Addresses.