Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRC: Event subscribe to support contract without ABI #34

Closed
DorianRust opened this issue Apr 19, 2019 · 0 comments
Closed

TRC: Event subscribe to support contract without ABI #34

DorianRust opened this issue Apr 19, 2019 · 0 comments

Comments

@DorianRust
Copy link
Contributor

DorianRust commented Apr 19, 2019

tip: 34
title: TRC-34 Event subscribe to support contract without ABI
author: wubin1<wubin1@tron.network> 
discussions to: https://github.com/tronprotocol/TIPs/issues/34
category: TRC
status: accepted
created: 2019-4-19

Abstract

To support contract without ABI, contract log parsing is separated from java-tron main program.
Moreover, developers could upload self ABI string to parse contract log and contract event, which could be more convenient to support some contracts without ABI.

Motivation

The contract does not need ABI anymore after the introduction of triggerConstantContract api, so tron-eventquery service could support developers to upload ABI and parse contract log and contract event.

Specification

In order to support contract without ABI, contract log parsing is separated from java-tron main program and we parse contract log in event plugin.
In addition, the function of parse contract log is configurable. It's is true by default.

event.subscribe = {
contractParse = true,
......

If it is false, we only pass the raw data to developers who subscribe events.

Moreover, event query service adds three new http api for supporting developers to developers parse contract log and contract event by self upload ABI string.

Developers could subscribe triggers more conveniently.

Backwards Compatibility

There are no backwards compatibility concerns.

Test Cases

  1. Emitting events from contract that without ABI.
  2. Emitting events from contract that with ABI.
@DorianRust DorianRust changed the title TRC: Event subscribe to support not abi TRC: Event subscribe to support contract without ABI Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants