Skip to content

Commit

Permalink
Merge pull request #6 from tellor-io/t360-goerli
Browse files Browse the repository at this point in the history
Tellor 360 implementation
  • Loading branch information
tkernell authored Jan 27, 2023
2 parents 09569a8 + 4e41b7c commit d9aa0e0
Show file tree
Hide file tree
Showing 7 changed files with 8,142 additions and 32,626 deletions.
4 changes: 2 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
MNEMONIC=
INFURA_KEY=
ETHERSCAN_API_KEY=
ETHERSCAN_API_KEY=
PK=
6 changes: 2 additions & 4 deletions contracts/TellorModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,10 @@ contract TellorModule is Module, UsingTellor {
);
require(_txHashes[_txIndex] == _txHash, "Unexpected transaction hash");
(
bool _ifRetrieve,
bytes memory _valueRetrieved,
uint256 _timestampReceived
) = getDataBefore(_queryId, block.timestamp);
require(_ifRetrieve, "Data not retrieved");
require(_timestampReceived > 0, "Data not retrieved");
// The result is valid in the time after the cooldown and before the expiration time (if set).
require(
_timestampReceived + uint256(cooldown) < block.timestamp,
Expand Down Expand Up @@ -315,11 +314,10 @@ contract TellorModule is Module, UsingTellor {
"No query id set for provided proposal"
);
(
bool _ifRetrieve,
bytes memory _valueRetrieved,
uint256 _timestampRetrieved
) = getDataBefore(_queryId, block.timestamp);
require(_ifRetrieve, "Data not retrieved");
require(_timestampRetrieved > 0, "Data not retrieved");
bool _didPass = abi.decode(_valueRetrieved, (bool));
require(_didPass, "Transaction was not approved");
require(
Expand Down
6 changes: 3 additions & 3 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ export default {
sources: "contracts",
},
solidity: {
compilers: [{ version: "0.8.0" }, { version: "0.6.12" }],
compilers: [{ version: "0.8.7" }, { version: "0.6.12" }],
},
networks: {
mainnet: {
...sharedNetworkConfig,
url: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
},
rinkeby: {
goerli: {
...sharedNetworkConfig,
url: `https://rinkeby.infura.io/v3/${INFURA_KEY}`,
url: `https://goerli.infura.io/v3/${INFURA_KEY}`,
gas: 10000000,
gasPrice: 40000000000,
},
Expand Down
Loading

0 comments on commit d9aa0e0

Please sign in to comment.