The goal of Kenshi Oracle Network is to enable developers to build their oracles using the technologies they know, while taking care of everything else from event sourcing to data delivery.
To allow maximum flexibility, we require you to create the logic part of your oracle and host it on your own infrastructure. The logic part needs to implement the following:
- POST: HTTP endpoint accepting POST requests.
- Request Body: Events are sent to this endpoint for processing. The events are in JSON format.
- Response Code: You must return a HTTP success code, otherwise the Kenshi event dispatcher will attempt retries.
- Response Body: You must respond with the instructions on how to process the event and what data should be sent to your smart contract on the blockchain. Response body should be JSON-formatted.
You are free to use the technology of your choice to implement the above protocol.
|The parsed log entry received from the blockchain
|Information about the event log
|Hex representation of the log index
|Information about the transaction
|Hex representation of the transaction index
|Hex representation of the transaction hash
|Information about the block
|Hex representation of the contract address emitting the event
|Hex representation of the block hash
|The block number
|Information about the emitted event
|Name of the emitted event
|Signature of the emitted event
|Parsed arguments for the emitted event
|Hex value of an argument where $ is the argument name
|ISO string of the date when this record was created in the Kenshi database cluster
|The "taskId" associated with your event listener task
|Name of the chain, possible values are: "ethereum-mainnet", "ethereum-goerli", "arbitrum-mainnet", "arbitrum-goerli", "avalanche-mainnet", "avalanche-fuji", "binance-mainnet", "binance-testnet", "polygon-mainnet", "polygon-mumbai", "fantom-mainnet", "fantom-testnet", "aurora-mainnet", "aurora-testnet", "bitgert-mainnet", "bitgert-testnet"
|Name or the signature of the method to call on your smart contract
|Arguments to pass to the selected method. Each argument needs to match the corresponding argument on the selected method and be parsable by the ethers.js library
|Number | Decimal String | Hex String
|Maximum amount of gas (in wei) you're willing to spend on this request
|Boolean | Null | Undefined
|Send true to abort delivering and ignore this event