Skip to main content

DynamicJobs.sol

Methods

creator()

Solidity

function creator() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

executeJob(address[],bytes[],bytes[])

Solidity

function executeJob(address[] _targetAddresses, bytes[] _userProvidedData, bytes[] _strategyProvidedData) external nonpayable
Details

Use this function to execute Jobs.Only Orchestrator can call this function.

Parameters

NameTypeDescription
_targetAddressesaddress[]are the addresses of the contracts on which the jobs needs to be executed.
_userProvidedDatabytes[]are the calldatas that are provided by the user at the registration time.
_strategyProvidedDatabytes[]are the encoded parameters sent on the time of creation or execution of action in orchestrator according to the strategy.

gasBalance()

Solidity

function gasBalance() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

gasVault()

Solidity

function gasVault() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

initialize(address,address,address,bytes)

Solidity

function initialize(address _vaultManager, address _orchestrator, address, bytes) external nonpayable

Parameters

NameTypeDescription
_vaultManageraddressundefined
_orchestratoraddressundefined
_2addressundefined
_3bytesundefined

jobState(bytes32)

Solidity

function jobState(bytes32) external view returns (uint256)
Details

The mapping of jobState has 3 possiblities 1) 0 means not registered 2) 1 means registered and paused 3) 2 means unpaused and registered (active)

Parameters

NameTypeDescription
_0bytes32undefined

Returns

NameTypeDescription
_0uint256undefined

keeperRegistry()

Solidity

function keeperRegistry() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

orchestrator()

Solidity

function orchestrator() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

owner()

Solidity

function owner() external view returns (address)
Details

Returns the address of the current owner.

Returns

NameTypeDescription
_0addressundefined

registerJob(bytes[],address[],string,string)

Solidity

function registerJob(bytes[] _userProvidedData, address[] _targetAddresses, string _name, string _ipfsForJobDetails) external nonpayable
Details

Use this function to register jobs.

Parameters

NameTypeDescription
_userProvidedDatabytes[]are the calldatas that are provided by the user at the registration time.
_targetAddressesaddress[]are the addresses of the contracts on which the jobs needs to be executed.
_namestringshould be the name of the job.
_ipfsForJobDetailsstringis the ipfs hash containing job details like the interval for job execution.

registerJobAndDepositGas(bytes[],address[],string,string)

Solidity

function registerJobAndDepositGas(bytes[] _userProvidedData, address[] _targetAddresses, string _name, string _ipfsForJobDetails) external payable
Details

Use this function to register jobs and deposit gas in one callSend the amount of gas that is needed to be deposited as msg.value.

Parameters

NameTypeDescription
_userProvidedDatabytes[]are the calldatas that are provided by the user at the registration time.
_targetAddressesaddress[]are the addresses of the contracts on which the jobs needs to be executed.
_namestringis the name of the job.
_ipfsForJobDetailsstringis the ipfs hash containing job details like the interval for job execution.

renounceOwnership()

Solidity

function renounceOwnership() external nonpayable
Details

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

setJobState(bytes32,uint256)

Solidity

function setJobState(bytes32 _jobHash, uint256 _toggle) external nonpayable
Details

Use this function to pause or unpause a job

Parameters

NameTypeDescription
_jobHashbytes32is the keccak of encoded parameters and target addresses
_toggleuint256pass 1 to pause the job and pass 2 to unpause the job

transferOwnership(address)

Solidity

function transferOwnership(address newOwner) external nonpayable
Details

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressundefined

withdrawGas(uint256,address)

Solidity

function withdrawGas(uint256 _amount, address payable to) external nonpayable
Details

Use this function to withdraw gas associated to this vaultOnly creator of this vault can call this function

Parameters

NameTypeDescription
_amountuint256is the amount of ether in wei that creator of this contract wants to pull out
toaddress payableis the address at which the creator wants to pull the deposited ether out

Events

JobExecuted

Solidity

event JobExecuted(bytes32 jobHash, address executor)

Parameters

NameTypeDescription
jobHashbytes32undefined
executoraddressundefined

JobRegistered

Solidity

event JobRegistered(bytes[] jobInfo, address[] targetAddresses, bytes32 jobHash, string name, string ipfsForJobDetails)

Parameters

NameTypeDescription
jobInfobytes[]undefined
targetAddressesaddress[]undefined
jobHashbytes32undefined
namestringundefined
ipfsForJobDetailsstringundefined

JobToggledByCreator

Solidity

event JobToggledByCreator(bytes32 jobHash, uint256 toggle)

Parameters

NameTypeDescription
jobHashbytes32undefined
toggleuint256undefined

OwnershipTransferred

Solidity

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressundefined
newOwner indexedaddressundefined