2023-06-23 12:42:55 +00:00
|
|
|
package adapt
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ethereum/go-ethereum/params"
|
|
|
|
|
|
|
|
plugeth_params "github.com/openrelayxyz/plugeth-utils/restricted/params"
|
|
|
|
)
|
|
|
|
|
|
|
|
func ChainConfig(cc *plugeth_params.ChainConfig) *params.ChainConfig {
|
2024-08-01 02:50:29 +00:00
|
|
|
ret := ¶ms.ChainConfig{
|
|
|
|
ChainID: cc.ChainID,
|
|
|
|
|
|
|
|
HomesteadBlock: cc.HomesteadBlock,
|
|
|
|
DAOForkBlock: cc.DAOForkBlock,
|
|
|
|
DAOForkSupport: cc.DAOForkSupport,
|
|
|
|
EIP150Block: cc.EIP150Block,
|
|
|
|
EIP155Block: cc.EIP155Block,
|
|
|
|
EIP158Block: cc.EIP158Block,
|
|
|
|
|
2023-06-23 12:42:55 +00:00
|
|
|
ByzantiumBlock: cc.ByzantiumBlock,
|
|
|
|
ConstantinopleBlock: cc.ConstantinopleBlock,
|
|
|
|
PetersburgBlock: cc.PetersburgBlock,
|
|
|
|
IstanbulBlock: cc.IstanbulBlock,
|
|
|
|
MuirGlacierBlock: cc.MuirGlacierBlock,
|
|
|
|
BerlinBlock: cc.BerlinBlock,
|
|
|
|
LondonBlock: cc.LondonBlock,
|
2024-08-01 02:50:29 +00:00
|
|
|
|
|
|
|
ArrowGlacierBlock: cc.ArrowGlacierBlock,
|
|
|
|
GrayGlacierBlock: cc.GrayGlacierBlock,
|
|
|
|
MergeNetsplitBlock: cc.MergeNetsplitBlock,
|
|
|
|
|
|
|
|
ShanghaiTime: cc.ShanghaiTime,
|
|
|
|
CancunTime: cc.CancunTime,
|
|
|
|
PragueTime: cc.PragueTime,
|
|
|
|
|
|
|
|
TerminalTotalDifficulty: cc.TerminalTotalDifficulty,
|
|
|
|
TerminalTotalDifficultyPassed: cc.TerminalTotalDifficultyPassed,
|
|
|
|
}
|
|
|
|
if cc.Ethash != nil {
|
|
|
|
ret.Ethash = ¶ms.EthashConfig{}
|
|
|
|
}
|
|
|
|
if cc.Clique != nil {
|
|
|
|
ret.Clique = ¶ms.CliqueConfig{cc.Clique.Period, cc.Clique.Epoch}
|
2023-06-23 12:42:55 +00:00
|
|
|
}
|
2024-08-01 02:50:29 +00:00
|
|
|
return ret
|
2023-06-23 12:42:55 +00:00
|
|
|
}
|