github.com/neatlab/neatio@v1.7.3-0.20220425043230-d903e92fcc75/tests/init.go (about) 1 package tests 2 3 import ( 4 "fmt" 5 "math/big" 6 7 "github.com/neatlab/neatio/params" 8 ) 9 10 // This table defines supported forks and their chain config. 11 var Forks = map[string]*params.ChainConfig{ 12 "Frontier": { 13 ChainId: big.NewInt(1), 14 }, 15 "Homestead": { 16 ChainId: big.NewInt(1), 17 HomesteadBlock: big.NewInt(0), 18 }, 19 "EIP150": { 20 ChainId: big.NewInt(1), 21 HomesteadBlock: big.NewInt(0), 22 EIP150Block: big.NewInt(0), 23 }, 24 "EIP158": { 25 ChainId: big.NewInt(1), 26 HomesteadBlock: big.NewInt(0), 27 EIP150Block: big.NewInt(0), 28 EIP155Block: big.NewInt(0), 29 EIP158Block: big.NewInt(0), 30 }, 31 "Byzantium": { 32 ChainId: big.NewInt(1), 33 HomesteadBlock: big.NewInt(0), 34 EIP150Block: big.NewInt(0), 35 EIP155Block: big.NewInt(0), 36 EIP158Block: big.NewInt(0), 37 ByzantiumBlock: big.NewInt(0), 38 }, 39 "Constantinople": { 40 ChainId: big.NewInt(1), 41 HomesteadBlock: big.NewInt(0), 42 EIP150Block: big.NewInt(0), 43 EIP155Block: big.NewInt(0), 44 EIP158Block: big.NewInt(0), 45 ByzantiumBlock: big.NewInt(0), 46 ConstantinopleBlock: big.NewInt(0), 47 PetersburgBlock: big.NewInt(0), 48 }, 49 "ConstantinopleFix": { 50 ChainId: big.NewInt(1), 51 HomesteadBlock: big.NewInt(0), 52 EIP150Block: big.NewInt(0), 53 EIP155Block: big.NewInt(0), 54 EIP158Block: big.NewInt(0), 55 ByzantiumBlock: big.NewInt(0), 56 ConstantinopleBlock: big.NewInt(0), 57 PetersburgBlock: big.NewInt(0), 58 }, 59 "Istanbul": { 60 ChainId: big.NewInt(1), 61 HomesteadBlock: big.NewInt(0), 62 EIP150Block: big.NewInt(0), 63 EIP155Block: big.NewInt(0), 64 EIP158Block: big.NewInt(0), 65 ByzantiumBlock: big.NewInt(0), 66 ConstantinopleBlock: big.NewInt(0), 67 PetersburgBlock: big.NewInt(0), 68 IstanbulBlock: big.NewInt(0), 69 }, 70 "FrontierToHomesteadAt5": { 71 ChainId: big.NewInt(1), 72 HomesteadBlock: big.NewInt(5), 73 }, 74 "HomesteadToEIP150At5": { 75 ChainId: big.NewInt(1), 76 HomesteadBlock: big.NewInt(0), 77 EIP150Block: big.NewInt(5), 78 }, 79 "HomesteadToDaoAt5": { 80 ChainId: big.NewInt(1), 81 HomesteadBlock: big.NewInt(0), 82 }, 83 "EIP158ToByzantiumAt5": { 84 ChainId: big.NewInt(1), 85 HomesteadBlock: big.NewInt(0), 86 EIP150Block: big.NewInt(0), 87 EIP155Block: big.NewInt(0), 88 EIP158Block: big.NewInt(0), 89 ByzantiumBlock: big.NewInt(5), 90 }, 91 } 92 93 // UnsupportedForkError is returned when a test requests a fork that isn't implemented. 94 type UnsupportedForkError struct { 95 Name string 96 } 97 98 func (e UnsupportedForkError) Error() string { 99 return fmt.Sprintf("unsupported fork %q", e.Name) 100 }