Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew7234 committed Jul 25, 2023
1 parent bdff664 commit 4ee5aad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/spec/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,7 @@ components:
The decoded `evm.log` event data. We currently support only two types of evm events, ERC20 `Transfer`
and `Approve`.
Absent if the event type is not `evm.log`.
evm_log_details:
evm_event_details:
$ref: '#/components/schemas/EvmEventDetails'
description: An event emitted by the runtime layer

Expand Down
2 changes: 1 addition & 1 deletion storage/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ func (c *StorageClient) RuntimeEvents(ctx context.Context, p apiTypes.GetRuntime
return nil, wrapError(err)
}
if ed != (apiTypes.EvmEventDetails{}) {
e.EvmLogDetails = &ed
e.EvmEventDetails = &ed
}
es.Events = append(es.Events, e)
}
Expand Down
3 changes: 1 addition & 2 deletions storage/client/queries/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,7 @@ const (
DECODE(evs.body ->> 'address', 'base64')=preimages.address_data
LEFT JOIN chain.evm_tokens as tokens ON
(evs.runtime=tokens.runtime) AND
(preimages.address=tokens.token_address) AND
(evs.evm_log_name='Transfer')
(preimages.address=tokens.token_address)
WHERE
(evs.runtime = $1) AND
($2::bigint IS NULL OR evs.round = $2::bigint) AND
Expand Down
3 changes: 3 additions & 0 deletions storage/migrations/02_runtimes.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ CREATE TABLE chain.runtime_events

tx_hash HEX64,
tx_eth_hash HEX64,
-- Added in 08_runtime_events_timestamp.up.sql
-- timestamp TIMESTAMP WITH TIME ZONE NOT NULL,

-- TODO: add link to openapi spec section with runtime event types.
type TEXT NOT NULL,
-- The raw event, as returned by the oasis-sdk runtime client.
Expand Down

0 comments on commit 4ee5aad

Please sign in to comment.