Skip to main content

AutomateReady.sol

AutomateReady

_Inherit this contract to allow your smart contract to

  • Make synchronous fee payments.
  • Have call restrictions for functions to be automated._

automate

contract IAutomate automate

dedicatedMsgSender

address dedicatedMsgSender

ETH

address ETH

CancelTaskSucceeded

event CancelTaskSucceeded(bytes32 taskId)

CancelTaskFailed

event CancelTaskFailed(bytes32 taskId)

onlyDedicatedMsgSender

modifier onlyDedicatedMsgSender()

@dev Only tasks created by _taskCreator defined in constructor can call the functions with this modifier.

constructor

constructor(address _automate, address _taskCreator) internal

@dev _taskCreator is the address which will create tasks for this contract.

_transfer

function _transfer(uint256 _fee, address _feeToken) internal

@dev Transfers fee to gelato for synchronous fee payments.

_fee & _feeToken should be queried from IAutomate.getFeeDetails()

_getFeeDetails

function _getFeeDetails() internal view returns (uint256 fee, address feeToken)