mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-08 21:48:11 -05:00
32 lines
855 B
Go
32 lines
855 B
Go
package version
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime/debug"
|
|
)
|
|
|
|
var tag = "v4.7.1"
|
|
|
|
var commit = func() string {
|
|
if info, ok := debug.ReadBuildInfo(); ok {
|
|
for _, setting := range info.Settings {
|
|
if setting.Key == "vcs.revision" {
|
|
value := setting.Value
|
|
if len(value) >= 7 {
|
|
return value[:7]
|
|
}
|
|
return value
|
|
}
|
|
}
|
|
}
|
|
// Set default value for integration test.
|
|
return "000000"
|
|
}()
|
|
|
|
// ZkVersion is commit-id of cargo.lock/zkvm-prover and openvm, contacted by a "-"
|
|
// The default `000000-000000` is set for integration test, and will be overwritten by coordinator's & prover's actual compilations (see their Makefiles).
|
|
var ZkVersion = "000000-000000"
|
|
|
|
// Version denote the version of scroll protocol, including the l2geth, relayer, coordinator, prover, contracts and etc.
|
|
var Version = fmt.Sprintf("%s-%s-%s", tag, commit, ZkVersion)
|