Skip to content
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

Draft/2.0.1 #392

Merged
merged 86 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
0d79109
feat: WitnetBytecodes.class()
guidiaz Nov 6, 2023
232944d
refactor: WitnetRequestFactory, WitnetRequestTemplate
guidiaz Nov 6, 2023
089dd5f
feat: WitnetRequestBoard.{class(), factory(), registry()}
guidiaz Nov 6, 2023
478ab18
refactor: WitnetRandomness
guidiaz Nov 6, 2023
c9ca54d
refactor: WitnetFeeds, WitnetPriceFeeds
guidiaz Nov 6, 2023
3f820b9
chore: make migration script work w/ latest refactorings
guidiaz Nov 6, 2023
d98ea96
chore: bump package version to 2.0.0
guidiaz Nov 6, 2023
2290209
feat: counter-factually bind core artifacts
guidiaz Nov 9, 2023
59a163f
chore: deprecate WPR
guidiaz Nov 9, 2023
c9f68cd
chore/feat: refactor contracts folder and impl counter-factual binding
guidiaz Nov 9, 2023
cc601b8
chore: refactor app-oracles
guidiaz Nov 9, 2023
efde9c2
feat: support counter-factual bindings on migrations
guidiaz Nov 9, 2023
a2918ef
feat: implement create2/3 address vanity generators
guidiaz Nov 9, 2023
1ed8756
chore: bump package version to 2.0.1
guidiaz Nov 9, 2023
d986cc8
feat: improve recovery of counter factual proxy addresses
guidiaz Nov 9, 2023
29a9609
feat: auto-save exportable abis when upgraded
guidiaz Nov 9, 2023
5d401ff
chore: add exportable abis
guidiaz Nov 9, 2023
8618481
chore: improve migrations logs
guidiaz Nov 9, 2023
026bbe9
chore: bump solc version to 0.8.22
guidiaz Nov 9, 2023
83785a0
fix: avoid addresses to be written on dryruns
guidiaz Nov 9, 2023
c7d7506
feat: add support to new radon string operators
guidiaz Nov 14, 2023
3c03201
feat: link WRB back from the WRF
guidiaz Nov 17, 2023
941a574
feat: implement class() on WR and WPF
guidiaz Nov 17, 2023
8cfe49c
chore: refactor+deprecates on IWitnetRequestBoard
guidiaz Nov 17, 2023
bbe087b
feat: modeling data request callbacks
guidiaz Nov 17, 2023
020c682
refactor: UsingWitnet
guidiaz Nov 17, 2023
692db6a
chore: move UsingWitnet to contracts/apps
guidiaz Nov 17, 2023
3acfe73
feat: extend UsingWitnet use cases
guidiaz Nov 17, 2023
129671e
feat: abstract WitnetConsumer use cases
guidiaz Nov 17, 2023
03201dd
refactor: WitnetBoardData* -> WitnetRequestBoardData*
guidiaz Nov 17, 2023
0788733
refactor: WRBD.__* -> WRBD.__seek*
guidiaz Nov 17, 2023
420d285
feat: implement WRB.burnQuery
guidiaz Nov 17, 2023
e3f8c25
feat: implement WRB.checkResultTraceability
guidiaz Nov 17, 2023
fc9173e
chore: deprecate old WitnetRequestBoardTrustableBoba
guidiaz Nov 17, 2023
87f112c
chore: reordering source code
guidiaz Nov 17, 2023
b9413ee
chore: deprecate IWRB.DeletedQuery
guidiaz Nov 17, 2023
c820012
feat: implement WRB.estimateBaseFee(uint,uint)
guidiaz Nov 17, 2023
c9286a8
feat: implement WRB.estimateBaseFeeWithCallback
guidiaz Nov 17, 2023
6ad43c7
feat: implement WRB.upgradeQueryReward
guidiaz Nov 17, 2023
c4cb486
chore: deprecating WRB.postRequest(address)
guidiaz Nov 17, 2023
d98e5b8
feat: deprecate Witnet.Request.gasprice
guidiaz Nov 17, 2023
3c41a25
refactor: WitnetV2.* -> Witnet.*
guidiaz Nov 23, 2023
f502d96
refactor: deprecate ballast on WitnetBytecodes
guidiaz Nov 23, 2023
f91d4d0
refactor: IWRB.read* -> IWRB.getQuery*
guidiaz Nov 23, 2023
9827c14
refactor: deprecate ballast on WitnetRequestBoard
guidiaz Nov 23, 2023
879bfc4
refactor: IWRB events
guidiaz Nov 23, 2023
30fd3f4
feat: implement query callbacks from the WRB
guidiaz Nov 23, 2023
87e8f29
feat: 5-param Witnet.RadonSLA -> 2-param WitnetV2.RadonSLA
guidiaz Nov 23, 2023
dc79d52
feat: implement posting of RAD raw bytecodes
guidiaz Nov 23, 2023
e737002
refactor: postpone dispute of queries to v2.1+
guidiaz Nov 23, 2023
f83f37f
chore: polish contract/apps
guidiaz Nov 23, 2023
77bee1d
refactor: Witnet*.class() -> Witnet*.specs()
guidiaz Nov 23, 2023
14cbe74
feat: Witnet*.class(): string
guidiaz Nov 23, 2023
f562eec
feat: contracts/apps/UsingWitnetRandomenss
guidiaz Nov 23, 2023
419ccac
fix: missing from upon WRB.postRequest
guidiaz Nov 24, 2023
94ac38c
fix: packing/unpacking of WitnetV2.RadonSLA
guidiaz Nov 24, 2023
20d58b2
chore: optimize WitnetRandomnes
guidiaz Nov 24, 2023
93a5ff1
refactor: WRBData.numQueries -> WRBData.nonce
guidiaz Nov 24, 2023
da7e40c
refactor: Witnet.QueryStatus.Deleted -> Witnet.QueryStatus.Delivered
guidiaz Nov 25, 2023
1480638
feat: declare UsingWitnet contracts to be throwers of WRB events
guidiaz Nov 25, 2023
846bebe
test/feat: polish callbacks implementation
guidiaz Nov 25, 2023
b6eb347
chore: reorder methods on IWRB
guidiaz Nov 25, 2023
7c2c088
refactor: *Query* events -> *WitnetQuery*
guidiaz Nov 25, 2023
edea9e8
refactor: IWRB.checkResult* -> IWRB.getQuery*
guidiaz Nov 25, 2023
9018436
refactor: IWitnetConsumer, Witnet.Query*, Witnet.Request, Witnet.Resp…
guidiaz Nov 28, 2023
fce673d
refactor: polish *WitnetRequestBoard*
guidiaz Nov 28, 2023
a2e6042
feat: optimize WitnetRequestBoardTrustableBase
guidiaz Nov 28, 2023
44723a8
chore: arrange contract/apps/* to latest changes
guidiaz Nov 28, 2023
88065dc
refactor: changes on Witnet.* -> WitnetV2.*
guidiaz Nov 28, 2023
eb7c61b
chore: IWitnetRequestBoard -> V2/IWitnetRequestBoard
guidiaz Nov 28, 2023
b50c8f6
chore: restoring Witnet.* v0.7 structs
guidiaz Nov 28, 2023
2d970fc
chore: IWitnetRequestBoardReporter -> V2/IWitnetRequestBoardReporter
guidiaz Nov 28, 2023
ddab6cf
feat: WRBTrustableBase.ddrTag()
guidiaz Nov 28, 2023
565c3bc
refactor: WRB.ddrTag() -> WRB.channel()
guidiaz Nov 29, 2023
cd14024
feat: add mocking contracts
guidiaz Nov 29, 2023
b4f7b71
chore: refactor Witnet*Mock -> WitnetMocked*
guidiaz Nov 29, 2023
1ba0496
chore: add disclaimer to mocked contracts
guidiaz Nov 29, 2023
ea8613f
feat: deprecate WitnetV2.RadonSLA.witnessingCollateralRatio
guidiaz Nov 30, 2023
ff0e351
chore: refactor UsingWitnetRandomness internal methods
guidiaz Nov 30, 2023
b8e74c8
chore: refactor UsingWitnet internal methods
guidiaz Nov 30, 2023
0d9fc0c
feat: UsingWitnet._witnetBaseFeeOverheadPercentage()
guidiaz Dec 1, 2023
71e7973
refactor: IWRB.estimateQueryEarnings -> IWRBReporter.estimateQueryEar…
guidiaz Dec 1, 2023
935395d
refactor: remove posting logic from UsingWitnet & WitnetConsumer
guidiaz Dec 1, 2023
1099a66
feat(libs): add support to new radon operators
guidiaz Dec 12, 2023
153f486
feat(libs): add support to new radon operators
guidiaz Jan 12, 2024
bc0bd92
chore: fmt!
guidiaz Jan 12, 2024
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: 1 addition & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"modifier-name-mixedcase": "warn",
"no-empty-blocks": "off",
"no-inline-assembly": "off",
"no-global-import": "off",
"var-name-mixedcase": "off",
"reason-string": [
"warn",
Expand Down
127 changes: 0 additions & 127 deletions contracts/UsingWitnet.sol

This file was deleted.

13 changes: 7 additions & 6 deletions contracts/WitnetBytecodes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ pragma solidity >=0.7.0 <0.9.0;
pragma experimental ABIEncoderV2;

import "./interfaces/V2/IWitnetBytecodes.sol";
import "./interfaces/V2/IWitnetBytecodesErrors.sol";
import "./interfaces/V2/IWitnetBytecodesEvents.sol";

abstract contract WitnetBytecodes
is
IWitnetBytecodes,
IWitnetBytecodesErrors,
IWitnetBytecodesEvents
{}
IWitnetBytecodes
{
function class() virtual external view returns (string memory) {
return type(WitnetBytecodes).name;
}
function specs() virtual external view returns (bytes4);
}
38 changes: 0 additions & 38 deletions contracts/WitnetFeeds.sol

This file was deleted.

24 changes: 0 additions & 24 deletions contracts/WitnetPriceFeeds.sol

This file was deleted.

25 changes: 0 additions & 25 deletions contracts/WitnetRandomness.sol

This file was deleted.

File renamed without changes.
35 changes: 12 additions & 23 deletions contracts/WitnetRequestBoard.sol
Original file line number Diff line number Diff line change
@@ -1,35 +1,24 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.7.0 <0.9.0;
pragma experimental ABIEncoderV2;

import "./WitnetBytecodes.sol";
import "./WitnetRequestFactory.sol";

import "./interfaces/IWitnetRequestBoardEvents.sol";
import "./interfaces/IWitnetRequestBoardReporter.sol";
import "./interfaces/IWitnetRequestBoardRequestor.sol";
import "./interfaces/IWitnetRequestBoardView.sol";

import "./interfaces/IWitnetRequestBoardDeprecating.sol";
import "./interfaces/V2/IWitnetRequestBoard.sol";
import "./interfaces/V2/IWitnetRequestBoardEvents.sol";

/// @title Witnet Request Board functionality base contract.
/// @author The Witnet Foundation.
abstract contract WitnetRequestBoard is
IWitnetRequestBoardDeprecating,
IWitnetRequestBoardEvents,
IWitnetRequestBoardReporter,
IWitnetRequestBoardRequestor,
IWitnetRequestBoardView
abstract contract WitnetRequestBoard
is
IWitnetRequestBoard,
IWitnetRequestBoardEvents
{
WitnetRequestFactory immutable public factory;
WitnetBytecodes immutable public registry;
constructor (WitnetRequestFactory _factory) {
require(
_factory.class() == type(WitnetRequestFactory).interfaceId,
"WitnetRequestBoard: uncompliant factory"
);
factory = _factory;
registry = _factory.registry();
function class() virtual external view returns (string memory) {
return type(WitnetRequestBoard).name;
}
function channel() virtual external view returns (bytes4);
function factory() virtual external view returns (WitnetRequestFactory);
function registry() virtual external view returns (WitnetBytecodes);
function specs() virtual external view returns (bytes4);
}
9 changes: 8 additions & 1 deletion contracts/WitnetRequestFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
pragma solidity >=0.7.0 <0.9.0;
pragma experimental ABIEncoderV2;

import "./WitnetBytecodes.sol";
import "./WitnetRequestBoard.sol";
import "./interfaces/V2/IWitnetRequestFactory.sol";

abstract contract WitnetRequestFactory
is
IWitnetRequestFactory
{}
{
function class() virtual external view returns (string memory);
function registry() virtual external view returns (WitnetBytecodes);
function specs() virtual external view returns (bytes4);
function witnet() virtual external view returns (WitnetRequestBoard);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,32 @@
pragma solidity >=0.7.0 <0.9.0;
pragma experimental ABIEncoderV2;

import "../WitnetRequestFactory.sol";
import "./WitnetBytecodes.sol";
import "./WitnetRequestBoard.sol";
import "./WitnetRequestFactory.sol";

abstract contract WitnetRequestTemplate
{
event WitnetRequestBuilt(address indexed request, bytes32 indexed radHash, string[][] args);

function class() virtual external view returns (bytes4);
function class() virtual external view returns (string memory);
function factory() virtual external view returns (WitnetRequestFactory);
function registry() virtual external view returns (WitnetBytecodes);
function specs() virtual external view returns (bytes4);
function version() virtual external view returns (string memory);
function witnet() virtual external view returns (WitnetRequestBoard);

function aggregator() virtual external view returns (bytes32);
function parameterized() virtual external view returns (bool);
function resultDataMaxSize() virtual external view returns (uint16);
function resultDataType() virtual external view returns (WitnetV2.RadonDataTypes);
function resultDataType() virtual external view returns (Witnet.RadonDataTypes);
function retrievals() virtual external view returns (bytes32[] memory);
function tally() virtual external view returns (bytes32);

function getRadonAggregator() virtual external view returns (WitnetV2.RadonReducer memory);
function getRadonRetrievalByIndex(uint256) virtual external view returns (WitnetV2.RadonRetrieval memory);
function getRadonAggregator() virtual external view returns (Witnet.RadonReducer memory);
function getRadonRetrievalByIndex(uint256) virtual external view returns (Witnet.RadonRetrieval memory);
function getRadonRetrievalsCount() virtual external view returns (uint256);
function getRadonTally() virtual external view returns (WitnetV2.RadonReducer memory);
function getRadonTally() virtual external view returns (Witnet.RadonReducer memory);

function buildRequest(string[][] calldata args) virtual external returns (address);
function verifyRadonRequest(string[][] calldata args) virtual external returns (bytes32);
Expand Down
Loading
Loading