You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
514 B

package utils
import (
"math/big"
"github.com/consensys/gnark/frontend"
)
func StrArrayToBigIntArray(input []string) []big.Int {
var output []big.Int
for i := 0; i < len(input); i++ {
a := new(big.Int)
a, _ = a.SetString(input[i], 10)
output = append(output, *a)
}
return output
}
func StrArrayToFrontendVariableArray(input []string) []frontend.Variable {
var output []frontend.Variable
for i := 0; i < len(input); i++ {
output = append(output, frontend.Variable(input[i]))
}
return output
}