(
contractAddress common.Address,
version byte,
method string,
params []interface{})
| 728 | } |
| 729 | |
| 730 | func 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 |
| 748 | func NewDeployCodeTransaction(gasPrice, gasLimit uint64, code []byte, vmType payload.VmType, |
nothing calls this directly
no test coverage detected