- Luis from Gelato (@gitpusha)
- Matthieu from Gelato (@Matthieu_MJ)
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: UNLICENSED | |
pragma solidity 0.8.6; | |
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
abstract contract Gelatofied { | |
using SafeERC20 for IERC20; | |
address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; |
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: UNLICENSED | |
pragma solidity 0.8.6; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "../interfaces/INftRush.sol"; | |
import "../gelato/Gelatofied.sol"; | |
contract GelatoNftRushWrapper is Ownable, Gelatofied { | |
using SafeERC20 for IERC20; |
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
interface IUniswapV2Pair { | |
event Approval( | |
address indexed owner, | |
address indexed spender, | |
uint256 value | |
); | |
event Transfer(address indexed from, address indexed to, uint256 value); | |
event Mint(address indexed sender, uint256 amount0, uint256 amount1); | |
event Burn( |
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: UNLICENSED | |
pragma solidity 0.8.0; | |
contract MockGelatoGasPriceOracle { | |
uint256 public gasPrice; | |
constructor(uint256 _gasPrice) { | |
gasPrice = _gasPrice; | |
} |
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
module.exports = async (hre) => { | |
const { deployments } = hre; | |
const { deploy } = deployments; | |
const { deployer } = await hre.getNamedAccounts(); | |
// the following will only deploy "MockGelatoGasPriceOracle" | |
// if the contract was never deployed or if the code changed since last deployment | |
await deploy("MockGelatoGasPriceOracle", { | |
from: deployer, | |
args: [hre.ethers.utils.parseUnits("40", "gwei")], |
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: UNLICENSED | |
pragma solidity 0.8.0; | |
contract TaskEmitter { | |
event LogTaskSubmitted(address indexed service, bytes task); | |
modifier isListed { | |
// Make some call to Gelato governance whitelist and check if service | |
// trying to submit a Task is whitelisted. | |
_; |
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
// running `npx hardhat run` automatically makes use of buidler-waffle plugin | |
const hre = require("hardhat"); | |
const { ethers } = hre; | |
const GelatoCoreLib = require("@gelatonetwork/core"); | |
const { sleep } = GelatoCoreLib; | |
(async function main() { | |
if (hre.network.name !== "hardhat") { | |
console.error("Test Suite is meant to be run on hardhat only"); | |
process.exit(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
// running `npx buidler run` automatically makes use of buidler-waffle plugin | |
// => only dependency we need is "chai" | |
const bre = require("@nomiclabs/buidler"); | |
const { ethers } = bre; | |
const GelatoCoreLib = require("@gelatonetwork/core"); | |
const { sleep } = GelatoCoreLib; | |
(async function main() { | |
if (bre.network.name !== "ganache") { | |
console.error("Test Suite is meant to be run on ganache only"); |
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: UNLICENSED" | |
pragma solidity 0.7.4; | |
pragma experimental ABIEncoderV2; | |
/// yarn add -D @gelatonetwork/core v1.0.0 | |
import { | |
GelatoProviderModuleStandard | |
} from "@gelatonetwork/core/contracts/provider_modules/GelatoProviderModuleStandard.sol"; | |
contract ProviderModuleDSA is GelatoProviderModuleStandard { |
NewerOlder