Writing Your Lambda Function
Last updated
Last updated
Your Lambda should be written as a regular JS function.
Upon runtime, the backend process invokes your task function within a set of parameters according to its trigger type:
Initialized object for interacting with the blockchain. Comes with pre-injected RPC provider, aw well as account credentials for signing transactions.
Storage handler. Supports the following methods:
Set key to hold the string value. If key already holds a value, it is overwritten. Any previous time to live (ttl) associated with the key is discarded on successful SET operation. Max value size is 1 KB.
options
:
ttl
: Set the specified expire time, in seconds.
Get the value of key. If the key does not exist the special value undefined
is returned.
Removes the specified keys. A key is ignored if it does not exist.
Array of guardians (executors) addresses.
(only relevant for onEvent)
(only relevant for onBlocks)
The first block in the range to be scanned for potential triggers.
(only relevant for onBlocks)
The last block in the range to be scanned for potential triggers.
key:value object containing the configuration, which you supply when .
The object which was emitted.