MCPcopy Create free account
hub / github.com/DNAProject/DNA / NewSmartContractTransaction

Function NewSmartContractTransaction

http/base/common/common.go:442–455  ·  view source on GitHub ↗
(gasPrice, gasLimit uint64, invokeCode []byte)

Source from the content-addressed store, hash-verified

440}
441
442func NewSmartContractTransaction(gasPrice, gasLimit uint64, invokeCode []byte) (*types.MutableTransaction, error) {
443 invokePayload := &payload.InvokeCode{
444 Code: invokeCode,
445 }
446 tx := &types.MutableTransaction{
447 GasPrice: gasPrice,
448 GasLimit: gasLimit,
449 TxType: types.InvokeNeo,
450 Nonce: uint32(time.Now().Unix()),
451 Payload: invokePayload,
452 Sigs: nil,
453 }
454 return tx, nil
455}
456
457//BuildNeoVMInvokeCode build NeoVM Invoke code for params
458func BuildNeoVMInvokeCode(smartContractAddress common.Address, params []interface{}) ([]byte, error) {

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected