-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add cron trigger and readcontract action
Signed-off-by: Lei <lei.shi@smartcontract.com>
- Loading branch information
1 parent
a9c706f
commit a0e0e20
Showing
8 changed files
with
526 additions
and
0 deletions.
There are no files selected for viewing
90 changes: 90 additions & 0 deletions
90
pkg/capabilities/actions/readcontract/action_builders_generated.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
58 changes: 58 additions & 0 deletions
58
pkg/capabilities/actions/readcontract/readcontract_action-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,58 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://github.com/smartcontractkit/chainlink-common/pkg/capabilities/actions/readcontract/read-contract-action@1.0.0", | ||
"$defs": { | ||
"Config": { | ||
"type": "object", | ||
"properties": { | ||
"ContractReaderConfig": { | ||
"type": "string" | ||
}, | ||
"ReadIdentifier": { | ||
"type": "string" | ||
}, | ||
"ContractAddress": { | ||
"type": "string" | ||
}, | ||
"ContractName": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["ContractReaderConfig", "ReadIdentifier", "ContractAddress", "ContractName"] | ||
}, | ||
"Input": { | ||
"type": "object", | ||
"properties": { | ||
"ConfidenceLevel": { | ||
"type": "string" | ||
}, | ||
"Params": { | ||
"type": "object", | ||
"additionalProperties": true | ||
} | ||
}, | ||
"required": ["ConfidenceLevel", "Params"] | ||
}, | ||
"Output": { | ||
"type": "object", | ||
"properties": { | ||
"LatestValue": { | ||
"type": ["object", "string", "boolean", "null", "array"] | ||
} | ||
}, | ||
"required": ["LatestValue"] | ||
} | ||
}, | ||
"type": "object", | ||
"properties": { | ||
"Config": { | ||
"$ref": "#/$defs/Config" | ||
}, | ||
"Inputs": { | ||
"$ref": "#/$defs/Input" | ||
}, | ||
"Outputs": { | ||
"$ref": "#/$defs/Output" | ||
} | ||
} | ||
} |
115 changes: 115 additions & 0 deletions
115
pkg/capabilities/actions/readcontract/readcontract_action_generated.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
pkg/capabilities/actions/readcontract/readcontracttest/action_mock_generated.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,43 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://github.com/smartcontractkit/chainlink-common/pkg/capabilities/triggers/cron/cron-trigger@1.0.0", | ||
"$defs": { | ||
"Payload": { | ||
"type": "object", | ||
"properties": { | ||
"ActualExecutionTime": { | ||
"type": "string", | ||
"description": "Time that cron trigger's task execution occurred (RFC3339Nano formatted)" | ||
}, | ||
"ScheduledExecutionTime": { | ||
"type": "string", | ||
"description": "Time that cron trigger's task execution had been scheduled to occur (RFC3339Nano formatted)" | ||
} | ||
}, | ||
"required": ["ActualExecutionTime", "ScheduledExecutionTime"], | ||
"additionalProperties": false | ||
}, | ||
"Config": { | ||
"type": "object", | ||
"properties": { | ||
"schedule": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["schedule"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"type": "object", | ||
"properties": { | ||
"config": { | ||
"$ref": "#/$defs/Config" | ||
}, | ||
"outputs": { | ||
"$ref": "#/$defs/Payload" | ||
} | ||
}, | ||
"required": ["config", "outputs"], | ||
"additionalProperties": false, | ||
"description": "A trigger that uses a cron schedule to run periodically at fixed times, dates, or intervals." | ||
} |
Oops, something went wrong.