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

Function PrepareInvokeNativeContract

cmd/utils/gas.go:730–745  ·  view source on GitHub ↗
(
	contractAddress common.Address,
	version byte,
	method string,
	params []interface{})

Source from the content-addressed store, hash-verified

728}
729
730func PrepareInvokeNativeContract(
731 contractAddress common.Address,
732 version byte,
733 method string,
734 params []interface{}) (*rpccommon.PreExecuteResult, error) {
735 mutable, err := httpcom.NewNativeInvokeTransaction(0, 0, contractAddress, version, method, params)
736 if err != nil {
737 return nil, err
738 }
739 tx, err := mutable.IntoImmutable()
740 if err != nil {
741 return nil, err
742 }
743 txData := hex.EncodeToString(common.SerializeToBytes(tx))
744 return PrepareSendRawTransaction(txData)
745}
746
747//NewDeployCodeTransaction return a smart contract deploy transaction instance
748func NewDeployCodeTransaction(gasPrice, gasLimit uint64, code []byte, vmType payload.VmType,

Callers

nothing calls this directly

Calls 2

IntoImmutableMethod · 0.80

Tested by

no test coverage detected