mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-10 06:28:04 -05:00
30 lines
632 B
Go
30 lines
632 B
Go
package version
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime/debug"
|
|
)
|
|
|
|
var tag = "alpha-v2.3"
|
|
|
|
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) >= 8 {
|
|
return value[:8]
|
|
}
|
|
return value
|
|
}
|
|
}
|
|
}
|
|
return ""
|
|
}()
|
|
|
|
// ZkVersion is commit-id of common/libzkp/impl/cargo.lock/scroll-zkevm
|
|
var ZkVersion string
|
|
|
|
// Version denote the version of scroll protocol, including the l2geth, relayer, coordinator, roller, contracts and etc.
|
|
var Version = fmt.Sprintf("%s-%s-%s", tag, commit, ZkVersion)
|