Commit c1d9e420 authored by Yann Hodique's avatar Yann Hodique Committed by GitHub

fix(kurtosis-devnet): provide fake implem of localPrestate (#13706)

parent 787cc9c9
......@@ -6,6 +6,11 @@ import (
"github.com/ethereum-optimism/optimism/kurtosis-devnet/pkg/tmpl"
)
type PrestateInfo struct {
URL string `json:"url"`
Hashes map[string]string `json:"hashes"`
}
func NewFakeTemplateContext(enclave string) *tmpl.TemplateContext {
return tmpl.NewTemplateContext(
tmpl.WithFunction("localDockerImage", func(image string) (string, error) {
......@@ -14,5 +19,13 @@ func NewFakeTemplateContext(enclave string) *tmpl.TemplateContext {
tmpl.WithFunction("localContractArtifacts", func(layer string) (string, error) {
return fmt.Sprintf("http://host.docker.internal:0/contracts-bundle-%s.tar.gz", enclave), nil
}),
tmpl.WithFunction("localPrestate", func() (*PrestateInfo, error) {
return &PrestateInfo{
URL: "http://fileserver/proofs/op-program/cannon",
Hashes: map[string]string{
"prestate": "0x1234567890",
},
}, nil
}),
)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment