EVM Compatibility
BESC Hyperchain runs a fully up-to-date Ethereum Virtual Machine. All Ethereum hardforks through Cancun are active from genesis block 0, meaning every EIP in the Cancun specification is available from the very first block.
Active Hardforks
| Hardfork | Active Since | Key EIPs |
|---|---|---|
| Berlin | Block 0 | EIP-2929 (gas cost increases), EIP-2930 (access lists) |
| London | Block 0 | EIP-1559 (fee market), EIP-3198, EIP-3529, EIP-3541 |
| Shanghai | Block 0 | EIP-3651, EIP-3855 (PUSH0 opcode), EIP-3860, EIP-4895 |
| Cancun | Block 0 | EIP-1153 (transient storage), EIP-5656 (MCOPY), EIP-6780 (SELFDESTRUCT), EIP-4844 (blob txs) |
Solidity Compatibility
Every version of Solidity is supported. You can deploy contracts compiled with any optimizer setting, any pragma solidity version, and any EVM target up to cancun.
solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
// This contract deploys identically on BESC Hyperchain and Ethereum
contract HelloBESC {
string public message = "Hello from BESC Hyperchain";
uint256 public chainId = block.chainid; // returns 2372
function update(string calldata _msg) external {
message = _msg;
}
}Precompiles
All standard Ethereum precompiles are available at their canonical addresses:
| Address | Precompile |
|---|---|
0x01 | ecRecover |
0x02 | SHA2-256 |
0x03 | RIPEMD-160 |
0x04 | identity |
0x05 | modexp |
0x06 | ecAdd (BN254) |
0x07 | ecMul (BN254) |
0x08 | ecPairing (BN254) |
0x09 | BLAKE2b |
Tooling Compatibility
All standard Ethereum development tools work with zero configuration changes beyond setting the RPC URL and chain ID:
| Tool | Compatible |
|---|---|
| MetaMask | ✅ |
| Hardhat | ✅ |
| Foundry (forge, cast, anvil) | ✅ |
| ethers.js (v5 & v6) | ✅ |
| viem | ✅ |
| web3.js | ✅ |
| OpenZeppelin Contracts | ✅ |
| Remix IDE | ✅ |
| Tenderly | ✅ (via custom network) |
| Wagmi | ✅ |
Deploying with Foundry
bash
forge create src/MyContract.sol:MyContract \
--rpc-url https://hyper.beschyperchain.com \
--private-key $PRIVATE_KEY \
--gas-price 1000000000000Deploying with Hardhat
bash
npx hardhat run scripts/deploy.js --network bescjavascript
// hardhat.config.js
networks: {
besc: {
url: 'https://hyper.beschyperchain.com',
chainId: 2372,
accounts: [process.env.PRIVATE_KEY],
gasPrice: 1000000000000,
},
}