GetSmartContractEvent return smart contract event execute by invoke transaction by hex string code
(txHash string)
| 459 | |
| 460 | //GetSmartContractEvent return smart contract event execute by invoke transaction by hex string code |
| 461 | func GetSmartContractEvent(txHash string) (*rpccommon.ExecuteNotify, error) { |
| 462 | data, ontErr := sendRpcRequest("getsmartcodeevent", []interface{}{txHash}) |
| 463 | if ontErr != nil { |
| 464 | switch ontErr.ErrorCode { |
| 465 | case ERROR_INVALID_PARAMS: |
| 466 | return nil, fmt.Errorf("invalid TxHash:%s", txHash) |
| 467 | } |
| 468 | return nil, ontErr.Error |
| 469 | } |
| 470 | notifies := &rpccommon.ExecuteNotify{} |
| 471 | err := json.Unmarshal(data, ¬ifies) |
| 472 | if err != nil { |
| 473 | return nil, fmt.Errorf("json.Unmarshal SmartContactEvent:%s error:%s", data, err) |
| 474 | } |
| 475 | return notifies, nil |
| 476 | } |
| 477 | |
| 478 | func GetSmartContractEventInfo(txHash string) ([]byte, error) { |
| 479 | data, ontErr := sendRpcRequest("getsmartcodeevent", []interface{}{txHash}) |
nothing calls this directly
no test coverage detected