-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added JSON schema for log event trigger capability
- Loading branch information
1 parent
a1661e9
commit 7ccf640
Showing
5 changed files
with
105 additions
and
4 deletions.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
core/capabilities/triggers/logevent/logeventcap/event_trigger-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://github.com/smartcontractkit/chainlink/core/capabilities/triggers/logevent/log-event-trigger", | ||
"$defs": { | ||
"head": { | ||
"type": "object", | ||
"properties": { | ||
"Height": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"Hash": { | ||
"type": "string", | ||
"minLength": 42 | ||
}, | ||
"Timestamp": { | ||
"type": "integer", | ||
"minimum": 10000 | ||
} | ||
} | ||
}, | ||
"config": { | ||
"type": "object", | ||
"properties": { | ||
"contractName": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"contractAddress": { | ||
"type": "string", | ||
"minLength": 42 | ||
}, | ||
"contractEventName": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"contractReaderConfig": { | ||
"type": "object", | ||
"properties": { | ||
"contracts": { | ||
"type": "object" | ||
} | ||
}, | ||
"required": ["contracts"] | ||
} | ||
}, | ||
"required": ["contractName", "contractAddress", "contractEventName", "contractReaderConfig"] | ||
}, | ||
"output": { | ||
"type": "object", | ||
"properties": { | ||
"Cursor": { | ||
"type": "string", | ||
"minLength": 60 | ||
}, | ||
"Head": { | ||
"$ref": "#/$defs/head" | ||
}, | ||
"Data": { | ||
"type": "object" | ||
} | ||
}, | ||
"required": ["Cursor", "Head", "Data"] | ||
} | ||
}, | ||
"type": "object", | ||
"properties": { | ||
"Config": { | ||
"$ref": "#/$defs/config" | ||
}, | ||
"Outputs": { | ||
"$ref": "#/$defs/output" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package readcontractcap | ||
|
||
import _ "github.com/smartcontractkit/chainlink-common/pkg/capabilities/cli/cmd" // Required so that the tool is available to be run in go generate below. | ||
|
||
//go:generate go run github.com/smartcontractkit/chainlink-common/pkg/capabilities/cli/cmd/generate-types --dir $GOFILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters