github.com/consensys/gnark-crypto@v0.14.0/field/goldilocks/internal/main.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/consensys/gnark-crypto/field/generator"
     7  	"github.com/consensys/gnark-crypto/field/generator/config"
     8  )
     9  
    10  //go:generate go run main.go
    11  func main() {
    12  	const modulus = "0xFFFFFFFF00000001"
    13  	goldilocks, err := config.NewFieldConfig("goldilocks", "Element", modulus, true)
    14  	if err != nil {
    15  		panic(err)
    16  	}
    17  	if err := generator.GenerateFF(goldilocks, "../"); err != nil {
    18  		panic(err)
    19  	}
    20  	fmt.Println("successfully generated goldilocks field")
    21  }