MCPcopy
hub / github.com/canopy-network/canopy / NewChangeParamTxString

Function NewChangeParamTxString

fsm/transaction.go:406–419  ·  view source on GitHub ↗

NewChangeParamTxString() creates a ChangeParamTransaction object (for strings) in the interface form of TransactionI

(from crypto.PrivateKeyI, space, key, value string, start, end, networkId, chainId, fee, height uint64, memo string)

Source from the content-addressed store, hash-verified

404
405// NewChangeParamTxString() creates a ChangeParamTransaction object (for strings) in the interface form of TransactionI
406func NewChangeParamTxString(from crypto.PrivateKeyI, space, key, value string, start, end, networkId, chainId, fee, height uint64, memo string) (lib.TransactionI, lib.ErrorI) {
407 a, err := lib.NewAny(&lib.StringWrapper{Value: value})
408 if err != nil {
409 return nil, err
410 }
411 return NewTransaction(from, &MessageChangeParameter{
412 ParameterSpace: space,
413 ParameterKey: key,
414 ParameterValue: a,
415 StartHeight: start,
416 EndHeight: end,
417 Signer: from.PublicKey().Address().Bytes(),
418 }, networkId, chainId, fee, height, memo)
419}
420
421// NewDAOTransferTx() creates a DAOTransferTransaction object in the interface form of TransactionI
422func NewDAOTransferTx(from crypto.PrivateKeyI, amount, start, end, networkId, chainId, fee, height uint64, memo string) (lib.TransactionI, lib.ErrorI) {

Callers 2

TestApproveProposalFunction · 0.85

Calls 5

NewAnyFunction · 0.92
NewTransactionFunction · 0.85
BytesMethod · 0.65
AddressMethod · 0.65
PublicKeyMethod · 0.65

Tested by 1

TestApproveProposalFunction · 0.68