Skip to content

2.1.x/pushable reports #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: 2.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env_example

This file was deleted.

10 changes: 10 additions & 0 deletions .env_witnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### ethrpc-gateway
#ETHRPC_DEFAULT_CHAIN=
ETHRPC_PRIVATE_KEYS=["0x...",]
#ETHRPC_PROVIDER_URL=

### witnet-toolkit
WITNET_TOOLKIT_MASTER_KEY=
WITNET_TOOLKIT_PROVIDER_URL=
WITNET_TOOLKIT_REPORTER_URL=
WITNET_TOOLKIT_ASSETS_PATH=
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Javacript methods and resources:
- List of supported EVM chains:
- `supportedNetworks()`
- WEB addresses at a given chain:
- `getAddresses(network)`
- `getNetworkAddresses(network)`
- WEB artifacts:
- `assets.WitOracle`
- `assets.WitPriceFeeds`
Expand Down
36 changes: 0 additions & 36 deletions contracts/WitFeeds.sol

This file was deleted.

7 changes: 5 additions & 2 deletions contracts/WitOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ import "./WitOracleRadonRegistry.sol";

import "./interfaces/IWitAppliance.sol";
import "./interfaces/IWitOracle.sol";
import "./interfaces/IWitOracleEvents.sol";
import "./interfaces/IWitOracleQueriable.sol";
import "./interfaces/IWitOracleQueriableEvents.sol";

/// @title Witnet Request Board functionality base contract.
/// @author The Witnet Foundation.
abstract contract WitOracle
is
IWitAppliance,
IWitOracle,
IWitOracleEvents
IWitOracleQueriable,
IWitOracleQueriableEvents
{
function specs() virtual override external pure returns (bytes4) {
return (
type(IWitAppliance).interfaceId
^ type(IWitOracle).interfaceId
^ type(IWitOracleQueriable).interfaceId
);
}
}
21 changes: 21 additions & 0 deletions contracts/WitOraclePushOnly.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0 <0.9.0;

import "./interfaces/IWitAppliance.sol";
import "./interfaces/IWitOracle.sol";

/// @title Witnet Request Board functionality base contract.
/// @author The Witnet Foundation.
abstract contract WitOraclePushOnly
is
IWitAppliance,
IWitOracle
{
function specs() virtual override external pure returns (bytes4) {
return (
type(IWitAppliance).interfaceId
^ type(IWitOracle).interfaceId
);
}
}
26 changes: 10 additions & 16 deletions contracts/WitPriceFeeds.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,28 @@

pragma solidity >=0.8.0 <0.9.0;

import "./WitFeeds.sol";
import "ado-contracts/contracts/interfaces/IERC2362.sol";

import "./interfaces/IWitPriceFeeds.sol";
import "./interfaces/IWitPriceFeedsSolverFactory.sol";
import "./interfaces/IWitPriceFeedsAdmin.sol";

/// @title WitPriceFeeds: Price Feeds live repository reliant on the Wit/Oracle blockchain.
/// @title WitPriceFeeds: Price Feeds repository powered by the Wit/Oracle,
/// @title and yet usable from both Chainlink and Pyth clients.
/// @author The Witnet Foundation.
abstract contract WitPriceFeeds
is
WitFeeds,
IERC2362,
IWitPriceFeeds,
IWitPriceFeedsSolverFactory
IWitPriceFeedsAdmin,
IWitOracleAppliance,
IWitOracleQueriableEvents
{
constructor()
WitFeeds(
Witnet.RadonDataTypes.Integer,
"Price-"
)
{}

function specs() virtual override external pure returns (bytes4) {
return (
type(IERC2362).interfaceId
^ type(IWitOracleAppliance).interfaceId
^ type(IWitFeeds).interfaceId
^ type(IWitFeedsAdmin).interfaceId
^ type(IWitPriceFeeds).interfaceId
^ type(IWitPriceFeedsSolverFactory).interfaceId
^ type(IWitPriceFeedsAdmin).interfaceId
^ type(IWitOracleAppliance).interfaceId
);
}
}
38 changes: 38 additions & 0 deletions contracts/WitPriceFeedsLegacy.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0 <0.9.0;

import "ado-contracts/contracts/interfaces/IERC2362.sol";

import "./interfaces/legacy/IWitPriceFeedsLegacy.sol";
import "./interfaces/legacy/IWitPriceFeedsLegacyAdmin.sol";
import "./interfaces/legacy/IWitPriceFeedsLegacySolverFactory.sol";

/// @title WitPriceFeedsLegacy: Price Feeds live repository reliant on the Wit/Oracle blockchain, up to V2.0.
/// @author The Witnet Foundation.
abstract contract WitPriceFeedsLegacy
is
IERC2362,
IWitPriceFeedsLegacy,
IWitPriceFeedsLegacyAdmin,
IWitPriceFeedsLegacySolverFactory,
IWitOracleAppliance,
IWitOracleQueriableEvents
{
Witnet.RadonDataTypes immutable public override dataType = Witnet.RadonDataTypes.Integer;
bytes32 immutable internal __prefix = "Price-";

function prefix() virtual override external view returns (string memory) {
return Witnet.toString(__prefix);
}

function specs() virtual override external pure returns (bytes4) {
return (
type(IERC2362).interfaceId
^ type(IWitOracleAppliance).interfaceId
^ type(IWitPriceFeedsLegacy).interfaceId
^ type(IWitPriceFeedsLegacyAdmin).interfaceId
^ type(IWitPriceFeedsLegacySolverFactory).interfaceId
);
}
}
4 changes: 2 additions & 2 deletions contracts/WitRandomness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
pragma solidity >=0.8.0 <0.9.0;

import "./interfaces/IWitOracleAppliance.sol";
import "./interfaces/IWitOracleEvents.sol";
import "./interfaces/IWitOracleQueriableEvents.sol";
import "./interfaces/IWitRandomness.sol";
import "./interfaces/IWitRandomnessEvents.sol";

abstract contract WitRandomness
is
IWitOracleAppliance,
IWitOracleEvents,
IWitOracleQueriableEvents,
IWitRandomness,
IWitRandomnessEvents
{
Expand Down
Loading