@@ -36,9 +36,9 @@ import (
36
36
)
37
37
38
38
var (
39
- opBlockTimeSeconds = uint64 (2 )
40
- defaultDiscoveryPrivKey = "a11ac89899cd86e36b6fb881ec1255b8a92a688790b7d950f8b7d8dd626671fb"
41
- defaultDiscoveryEnodeID = "3479db4d9217fb5d7a8ed4d61ac36e120b05d36c2eefb795dc42ff2e971f251a2315f5649ea1833271e020b9adc98d5db9973c7ed92d6b2f1f2223088c3d852f"
39
+ defaultOpBlockTimeSeconds = uint64 (2 )
40
+ defaultDiscoveryPrivKey = "a11ac89899cd86e36b6fb881ec1255b8a92a688790b7d950f8b7d8dd626671fb"
41
+ defaultDiscoveryEnodeID = "3479db4d9217fb5d7a8ed4d61ac36e120b05d36c2eefb795dc42ff2e971f251a2315f5649ea1833271e020b9adc98d5db9973c7ed92d6b2f1f2223088c3d852f"
42
42
)
43
43
44
44
// minimumGenesisDelay is the minimum delay for the genesis time. This is required
@@ -66,13 +66,15 @@ type ArtifactsBuilder struct {
66
66
applyLatestL1Fork bool
67
67
genesisDelay uint64
68
68
applyLatestL2Fork * uint64
69
+ OpblockTime uint64
69
70
}
70
71
71
72
func NewArtifactsBuilder () * ArtifactsBuilder {
72
73
return & ArtifactsBuilder {
73
74
outputDir : "" ,
74
75
applyLatestL1Fork : false ,
75
76
genesisDelay : MinimumGenesisDelay ,
77
+ OpblockTime : defaultOpBlockTimeSeconds ,
76
78
}
77
79
}
78
80
@@ -96,6 +98,11 @@ func (b *ArtifactsBuilder) GenesisDelay(genesisDelaySeconds uint64) *ArtifactsBu
96
98
return b
97
99
}
98
100
101
+ func (b * ArtifactsBuilder ) OpBlockTime (blockTimeSeconds uint64 ) * ArtifactsBuilder {
102
+ b .OpblockTime = blockTimeSeconds
103
+ return b
104
+ }
105
+
99
106
type Artifacts struct {
100
107
Out * output
101
108
}
@@ -258,7 +265,7 @@ func (b *ArtifactsBuilder) Build() (*Artifacts, error) {
258
265
forkTime = new (uint64 )
259
266
260
267
if * b .applyLatestL2Fork != 0 {
261
- * forkTime = opTimestamp + opBlockTimeSeconds * (* b .applyLatestL2Fork )
268
+ * forkTime = opTimestamp + b . OpblockTime * (* b .applyLatestL2Fork )
262
269
} else {
263
270
* forkTime = 0
264
271
}
@@ -317,6 +324,7 @@ func (b *ArtifactsBuilder) Build() (*Artifacts, error) {
317
324
"number" : 0 ,
318
325
},
319
326
},
327
+ "block_time" : b .OpblockTime ,
320
328
"chain_op_config" : map [string ]interface {}{ // TODO: Read this from somewhere (genesis??)
321
329
"eip1559Elasticity" : 6 ,
322
330
"eip1559Denominator" : 50 ,
0 commit comments