"golang.org/x/crypto/sha3"
"github.com/vapor/common"
- "github.com/vapor/config"
+ cfg "github.com/vapor/config"
"github.com/vapor/consensus"
"github.com/vapor/encoding/json"
"github.com/vapor/protocol/bc"
return MissingFieldsError(missing...)
}
- address, err := common.DecodeAddress(a.Address, &consensus.MainNetParams)
+ address, err := common.DecodeAddress(a.Address, consensus.BytomMainNetParams(&consensus.ActiveNetParams))
if err != nil {
return err
}
// arguments will be set when materializeWitnesses
txin := types.NewCrossChainInput(nil, a.SourceID, *a.AssetId, a.Amount, a.SourcePos, a.VMVersion, a.RawDefinitionByte, a.IssuanceProgram)
tplIn := &SigningInstruction{}
- fed := config.CommonConfig.Federation
- tplIn.AddRawWitnessKeys(fed.Xpubs, nil, fed.Quorum)
+ fed := cfg.CommonConfig.Federation
+ tplIn.AddRawWitnessKeys(fed.Xpubs, cfg.FedAddressPath, fed.Quorum)
+ tplIn.AddDataWitness(cfg.FederationPMultiSigScript(cfg.CommonConfig))
return builder.AddInput(txin, tplIn)
}