mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
core: support EIP-4788 Pre-deploy contract to dev environment
This commit is contained in:
parent
ad4fb2c729
commit
746ae51ddd
2 changed files with 7 additions and 0 deletions
|
|
@ -595,6 +595,9 @@ func DeveloperGenesisBlock(gasLimit uint64, faucet *common.Address) *Genesis {
|
|||
common.BytesToAddress([]byte{9}): {Balance: big.NewInt(1)}, // BLAKE2b
|
||||
},
|
||||
}
|
||||
// Pre-deploy EIP-4788 system contract
|
||||
genesis.Alloc[params.BeaconRootsAddress] = types.Account{Code: params.BeaconRootsCode}
|
||||
|
||||
if faucet != nil {
|
||||
genesis.Alloc[*faucet] = types.Account{Balance: new(big.Int).Sub(new(big.Int).Lsh(big.NewInt(1), 256), big.NewInt(9))}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,6 +186,10 @@ var (
|
|||
|
||||
// BeaconRootsAddress is the address where historical beacon roots are stored as per EIP-4788
|
||||
BeaconRootsAddress = common.HexToAddress("0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02")
|
||||
|
||||
// BeaconRootsCode is the code where historical beacon roots are stored as per EIP-4788
|
||||
BeaconRootsCode = []byte("3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500")
|
||||
|
||||
// SystemAddress is where the system-transaction is sent from as per EIP-4788
|
||||
SystemAddress = common.HexToAddress("0xfffffffffffffffffffffffffffffffffffffffe")
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue