Skip to content

Instantly share code, notes, and snippets.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "@api3/contracts/v0.8/interfaces/IProxy.sol";
contract Api3AggregatorAdaptor {
// Updating the proxy address is a security-critical action which is why
// we have made it immutable.
address public immutable ethToUsdProxy;
@Ashar2shahid
Ashar2shahid / Api3Options.sol
Last active March 25, 2023 04:08
Only imports and main functions
pragma solidity ^0.8.17;
import "@api3/contracts/v0.8/interfaces/IProxy.sol";
contract Api3Options {
//Pricefeed proxies
address public ethProxy;
address public linkProxy;
uint ethPrice;
uint linkPrice;
@Ashar2shahid
Ashar2shahid / ChainlinkOptions.sol
Last active March 25, 2023 03:54
Only imports and necessary functions
pragma solidity ^0.8.17;
import "https://github.com/smartcontractkit/chainlink/blob/develop/evm-contracts/src/v0.6/interfaces/LinkTokenInterface.sol";
import "https://github.com/smartcontractkit/chainlink/blob/master/evm-contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
contract chainlinkOptions {
//Pricefeed interfaces
AggregatorV3Interface internal ethFeed;
AggregatorV3Interface internal linkFeed;
//Interface for LINK token functions
pragma solidity 0.8.17;
import "@api3/contracts/v0.8/interfaces/IProxy.sol";
contract Api3Options {
// ETH/USD proxy address
address proxy;
uint ethPrice;
pragma solidity ^0.8.17;
import "https://github.com/smartcontractkit/chainlink/blob/develop/evm-contracts/src/v0.6/interfaces/LinkTokenInterface.sol";
import "https://github.com/smartcontractkit/chainlink/blob/master/evm-contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
contract ChainlinkOptions {
//Pricefeed interfaces
AggregatorV3Interface internal ethFeed;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "https://github.com/gelatodigital/automate/blob/master/contracts/integrations/AutomateReady.sol";
// @title Contract to fund sponsor wallets if balance is less than minimum balance
contract Automation is Ownable, AutomateReady {
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@api3/airnode-protocol-v1/contracts/dapis/DapiReader.sol";
contract DataFeedReaderExample is DapiReader {
constructor(address _dapiServer) DapiReader(_dapiServer) {}
//SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract DemoNFT is Ownable, ERC721 {
constructor() ERC721("Demo Day", "DD") {}
uint256 public index;
//SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
contract Arbitration {
address public arbitor;
address public userA;
address public userB;
constructor() {
function generateQuantumon(bytes32 requestId, bytes calldata data)
public
onlyAirnodeRrp
{
require(
expectingRequestWithIdToBeFulfilled[requestId],
"Request ID not known"
);
expectingRequestWithIdToBeFulfilled[requestId] = false;
uint256 qrngUint256 = abi.decode(data, (uint256));