This file contains hidden or 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.19; | |
| import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol"; | |
| contract DataConsumerV3 { | |
| AggregatorV3Interface internal dataFeed; | |
| uint256 constant NORMALIZED_DECIMALS = 18; | |
| constructor(address _priceFeed) { |
This file contains hidden or 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: Unlicense | |
| //CAUTION: NOT AUDITED, NO GUARANTEES OF PERFORMANCE | |
| /******************************************* | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| ~~~~~~~~~~~~~~~~~ ROULETTE ~~~~~~~~~~~~~~~~~ | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| -------------------------------------------- |
This file contains hidden or 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.19; | |
| import "@api3/contracts/api3-server-v1/proxies/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 proxy; |
This file contains hidden or 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.19; | |
| import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol"; | |
| contract DataConsumerV3 { | |
| AggregatorV3Interface internal dataFeed; | |
| constructor(address _priceFeed) { | |
| dataFeed = AggregatorV3Interface(_priceFeed); |
This file contains hidden or 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.19; | |
| import "@api3/contracts/api3-server-v1/proxies/interfaces/IProxy.sol"; | |
| import "@openzeppelin/contracts@4.9.3/access/Ownable.sol"; | |
| contract API3PriceFeed is Ownable { | |
| address public proxyAddress; |
This file contains hidden or 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.22; | |
| import "@api3/contracts/api3-server-v1/proxies/interfaces/IProxy.sol"; | |
| import "@openzeppelin/contracts/access/Ownable.sol"; | |
| contract API3PriceFeed is Ownable { | |
| address public proxyAddress; |
This file contains hidden or 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
| /* | |
| Deploy this with the Price Feed address from https://market.api3.org/dapis | |
| From your selected network | |
| */ | |
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.17; | |
| import "@api3/contracts/v0.8/interfaces/IProxy.sol"; |
This file contains hidden or 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.22; | |
| import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
| import "@openzeppelin/contracts/access/Ownable.sol"; | |
| contract StakingContract is Ownable { | |
| IERC20 public stakingToken; |
This file contains hidden or 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.22; | |
| import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
| import "@openzeppelin/contracts/access/Ownable.sol"; | |
| contract MyToken is ERC20, Ownable { | |
| constructor(address initialOwner) ERC20("MyToken", "MTK") Ownable(initialOwner) | |
| { | |
| _mint(msg.sender, 1000 * 10**18); |
This file contains hidden or 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.19; | |
| // https://docs.api3.org/reference/qrng/chains.html | |
| // https://docs.api3.org/reference/qrng/providers.html | |
| // https://docs.api3.org/reference/airnode/latest/packages/admin-cli.html | |
| import "@api3/airnode-protocol/contracts/rrp/requesters/RrpRequesterV0.sol"; | |
| import "@openzeppelin/contracts@4.9.5/access/Ownable.sol"; |
NewerOlder