+func GenesisArguments(c *Config) []byte {
+ pubKeys := chainkd.XPubKeys(c.Federation.Xpubs)
+ fedpegScript, err := vmutil.P2SPMultiSigProgram(pubKeys, c.Federation.Quorum)
+ if err != nil {
+ log.Panicf("fail on decode genesis arguments for federation")
+ }
+
+ scriptHash := crypto.Sha256(fedpegScript)
+
+ control, err := vmutil.P2WSHProgram(scriptHash)
+ if err != nil {
+ log.Panicf("Fail converts scriptHash to program on GenesisArguments: %v", err)
+ }
+
+ return control
+}
+