┌─────────┬──────────┬─────────────────────────────────┬────────────┬────────────┬────────────────────────┬─────────┐
│ (index) │ kind │ name │ minGasUsed │ maxGasUsed │ observationCardinality │ avgGas │
├─────────┼──────────┼─────────────────────────────────┼────────────┼────────────┼────────────────────────┼─────────┤
│ 0 │ 'uni-v3' │ 'AAVE/ETH (Uniswap V3)' │ 65550 │ 65550 │ 50 │ 65550 │
│ 1 │ 'uni-v3' │ 'APE/ETH (Uniswap V3)' │ 65142 │ 65158 │ 50 │ 65148.4 │
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "contract DataStore", | |
"name": "dataStore", | |
"type": "address" | |
}, | |
{ | |
"internalType": "contract Reader", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[FAIL. Reason: EvmError: Revert] test_perform_upkeep_real_performData() (gas: 8660281895700906882) | |
Traces: | |
[6936613] MarketAutomationTest_End2End::setUp() | |
├─ [0] VM::envString(ARBITRUM_GOERLI_URL) [staticcall] | |
│ └─ ← <env var value> | |
├─ [0] VM::createSelectFork(https://arb-goerli.g.alchemy.com/v2/-WCwmeQ9qLa5T5Lrm8KlXtaiQdWAsfX_) | |
│ └─ ← 0 | |
├─ [0] VM::envAddress(DATA_STORE) [staticcall] | |
│ └─ ← <env var value> | |
├─ [0] VM::envAddress(READER) [staticcall] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@chainlink/contracts/src/v0.8/dev/ChainlinkClient.sol"; | |
/** | |
* @notice DO NOT USE THIS CODE IN PRODUCTION. This is an example contract. | |
*/ | |
contract Consumer is ChainlinkClient { | |
using Chainlink for Chainlink.Request; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; // solidity version | |
// imports | |
import "./AnInterface.sol"; | |
import "./ALibrary.sol"; | |
contract Example is AnInterface { | |
// library using statements | |
using ALibrary for uint256; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from web3 import Web3 | |
import requests, datetime | |
# Replace INFURA_URL with mainnet url | |
# Run this file with: | |
# `python3 compare_oracles.py` | |
w3 = Web3(Web3.HTTPProvider('INFURA_URL')) | |
prod_oracle='0x4007B71e01424b2314c020fB0344b03A7C499E1A' | |
proposed_oracle='0x841616a5CBA946CF415Efe8a326A621A794D0f97' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.6.12; | |
pragma experimental ABIEncoderV2; | |
// Based on code from https://github.com/Uniswap/uniswap-v2-periphery | |
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format)) | |
library FixedPoint { | |
// range: [0, 2**112 - 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol"; | |
import "https://github.com/smartcontractkit/chainlink/blob/develop/evm-contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; | |
contract BadStalenessChecker is Ownable { | |
// Details about a price feed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "https://github.com/smartcontractkit/chainlink/blob/develop/evm-contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; | |
interface KeeperCompatibleInterface { | |
function checkUpkeep(bytes calldata checkData) external returns (bool upkeepNeeded, bytes memory performData); | |
function performUpkeep(bytes calldata performData) external; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "https://github.com/smartcontractkit/chainlink/blob/develop/evm-contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; | |
contract Staleness { | |
uint public immutable interval; | |
mapping(AggregatorV3Interface => bool) public staleFlag; |
NewerOlder