INNER CODE UNIT · Go
exportVRFKey
smartcontractkit/chainlink · core/scripts/common/vrf/setup-envs/main.go:362
func exportVRFKey(client *clcmd.Shell, app *cli.App, vrfKey presenters.VRFKeyResource, output *bytes.Buffer) {
if err := os.WriteFile("vrf-key-password.txt", []byte("twochains"), 0600); err != nil {
helpers.PanicErr(err)
}
flagSet := flag.NewFlagSet("blah", flag.ExitOnError)
flagSet.String("new-password", "./vrf-key-password.txt", "")
flagSet.String("output", "exportedvrf.json", "")
err := flagSet.Parse([]string{vrfKey.Compressed})
helpers.PanicErr(err)
err = client.ExportVRFKey(cli.NewContext(app, flagSet, nil))
helpers.PanicErr(err)
output.Reset()
}
func importVRFKey(client *clcmd.Shell, app *cli.App, output *bytes.Buffer) {
if err := os.WriteFile("vrf-key-password.txt", []byte("twochains"), 0600); err != nil {
helpers.PanicErr(err)
}