Use this package to install the Tellor user contracts and test helper functions, and to integrate Tellor into your contracts.
contracts/interfaces/ITellorDataBridge.sol- The TellorDataBridge interfacecontracts/testing/TellorLab.sol- A testing contract for rapid prototyping with Tellor oracle datacontracts/interfaces/ITellorDataBank.sol- The TellorDataBank interface, a standard interface for reading tellor datacontracts/bridge/TellorDataBridge.sol- The TellorDataBridge contractsrc/helpers/evmHelpers.js- Helper functions for testing
Use this package with your own npm project. See the SampleLayerUser repo for usage examples.
npm install usingtellorlayerimport "usingtellorlayer/contracts/interfaces/ITellorDataBridge.sol";
contract PriceContract {
    ITellorDataBridge public dataBridge;
    uint256 public price;
    constructor(address _dataBridge) {
        dataBridge = ITellorDataBridge(_dataBridge);
    }
    function updateOracleData(
        OracleAttestationData calldata _attestData,
        Validator[] calldata _currentValidatorSet,
        Signature[] calldata _sigs
    ) public {
        // verify that data came from tellor chain
        dataBridge.verifyOracleData(_attestData, _currentValidatorSet, _sigs);
        // NOTE: This is a simplified example. More security checks should be done
        // in production to ensure data integrity.
        price = abi.decode(_attestData.report.value, (uint256));
    }
}Find Tellor contract addresses here.
Open a terminal and run:
git clone https://github.com/tellor-io/UsingTellorLayer.git
cd UsingTellorLayer
npm i
npx hardhat testFor secure integrations, refer to the tellor docs. Also, see example integrations in the SampleLayerUser repo.
@themandalore @brendaloya
Check out our issues log here on Github out in our Discord
This repository is maintained by the Tellor team - www.tellor.io
Tellor Inc. 2025