Skip to main content
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:
  1. POST: HTTP endpoint accepting POST requests.
  2. Request Body: Events are sent to this endpoint for processing. The events are in JSON format.
  3. Response Code: You must return a HTTP success code, otherwise the Kenshi event dispatcher will attempt retries.
  4. 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. Respone body should be JSON formatted.
You are free to use the technology of your choice to implement the above protocol.
entry Object The parsed log entry received from the blockchain
entry.log Object Information about the event log
entry.log.index String Hex representation of the log index
entry.transaction Object Information about the transaction
entry.transaction.index String Hex representation of the transaction index
entry.transaction.hash String Hex representation of the transaction hash
entry.block Object Information about the block
entry.block.address String Hex representation of the contract address emitting the event
entry.block.hash String Hex representation of the block hash
entry.block.number Number The block number
entry.event Object Information about the emitted event String Name of the emitted event
entry.event.signature String Signature of the emitted event
entry.event.args Object Parsed arguments for the emitted event
entry.event.args.$ String Hex value of an argument where $ is the argument name
entry.createdAt String ISO string of the date when this record was created in the Kenshi database cluster
taskId String The "taskId" associated with your event listener task
blockchain String Name of the chain, possible values are: "ethereum-mainnet", "ethereum-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"
method String Name or the signature of the method to call on your smart contract
args Array<Any> 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
maxGas Number | Decimal String | Hex String Maximum amount of gas (in wei) you're willing to spend on this request
abort Boolean | Null | Undefined Send true to abort delivering and ignore this event
You can find the ethers.js documentation here.