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

Function NewWasmSmartContractTransaction

core/utils/transaction_builder.go:266–279  ·  view source on GitHub ↗
(gasPrice, gasLimit uint64, invokeCode []byte)

Source from the content-addressed store, hash-verified

264}
265
266func NewWasmSmartContractTransaction(gasPrice, gasLimit uint64, invokeCode []byte) (*types.MutableTransaction, error) {
267 invokePayload := &payload.InvokeCode{
268 Code: invokeCode,
269 }
270 tx := &types.MutableTransaction{
271 GasPrice: gasPrice,
272 GasLimit: gasLimit,
273 TxType: types.InvokeWasm,
274 Nonce: uint32(time.Now().Unix()),
275 Payload: invokePayload,
276 Sigs: nil,
277 }
278 return tx, nil
279}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected