Skip to content

Commit

Permalink
add cron trigger and readcontract action
Browse files Browse the repository at this point in the history
Signed-off-by: Lei <lei.shi@smartcontract.com>
  • Loading branch information
shileiwill committed Dec 10, 2024
1 parent a9c706f commit a0e0e20
Show file tree
Hide file tree
Showing 8 changed files with 526 additions and 0 deletions.
90 changes: 90 additions & 0 deletions 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.

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 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.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions pkg/capabilities/triggers/cron/cron_trigger-schema.json
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."
}
Loading

0 comments on commit a0e0e20

Please sign in to comment.