tellor-io / dataSpecs

Data specifications for oracle queries
16 stars 9 forks source link

Change EVMCall response type #107

Closed oraclown closed 1 year ago

oraclown commented 1 year ago

I think the response type needs to be more general, or clarified that it's more general. I think the following makes it easier to handle the response on the client side of things:

Says: Response should return a concatenation of the value and the timestamp And later the example is:

response = abi.encode(
    2390472032948139443578988, #total supply
    1654697834, #current timestamp
    )

Should say something like: To form a response to this query, first encode the value returned from the read function call. After, encode that bytes value together with the timestamp the read function was called at. In that order. Example:

response = abi.encode(
    abi.encode(2390472032948139443578988), #total supply
    1654697834, #current timestamp
    )