DigiOracle is a highly modular blockchain oracle that allows you securely connect your Web3 applications with events, data and assets from the real world.
With support for more chains, data feeds and broader use cases, KlayOracle has evolved to DigiOracle
DigiOracle's highly modular design maximizes network efficiency by separating network components such as data providers and nodes, and enabling them independently, ensuring optimal resource utilization for secure and reliable off-chain data connectivity.
Designed for compatibility with all EVM chains, DigiOracle does the heavy lifting of data sourcing, aggregation, and providing this data in formats that can be easily integrated within EVM-compatible smart contracts.
DigiOracle ensures the integrity and confidentiality of data, using authentication mechanisms such as SSL and OAuth to ensure encrypted communication between components, and providing a robust and secure bridge between Web3 applications and real-world events, data, and assets.
DigiOracle's modular architecture enables the interdependent operation of data providers and nodes. Learn more about how this unlocks greater efficiency and resource utilization for oracle networks.
Integrate DigiOracle into your projects with our intuitive APIs and developer-friendly documentation. Access price feeds, verifiable random numbers, and other valuable off-chain datasets with DigiOracle.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
import "https://github.com/KlayOracle/klayoracle-monorepo/blob/development/oracle-contract/contracts/KlayOracleInterface.sol";
contract OracleConsumerSample {
address public immutable oracleAddress;
uint256 public klayOutput;
constructor(address _oracleAddress) {
require(_oracleAddress != address(0));
oracleAddress = _oracleAddress;
}
function swapUsdtoKlay() public returns (bool) {
KlayOracleInterface oracle = KlayOracleInterface(oracleAddress);
bool replied = oracle.newOracleRequest(
this.swap.selector,
address(this)
);
return replied;
}
function swap(uint256 _klayOutput) external {
require(msg.sender == oracleAddress, "not allowed"); //ensure only Oracle contract can set price
klayOutput = _klayOutput;
//Swap usd to klay
}
}
DigiOracle Explorer is an open dashboard for exploring the activity and real-time information of nodes, data explorers and data feeds on the DigiOracle network.