DynamicJobs.sol
Methods
creator()
function creator() external view returns (address)
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
executeJob(address[],bytes[],bytes[])
function executeJob(address[] _targetAddresses, bytes[] _userProvidedData, bytes[] _strategyProvidedData) external nonpayable
Use this function to execute Jobs.Only Orchestrator can call this function.
Parameters
Name | Type | Description |
---|---|---|
_targetAddresses | address[] | are the addresses of the contracts on which the jobs needs to be executed. |
_userProvidedData | bytes[] | are the calldatas that are provided by the user at the registration time. |
_strategyProvidedData | bytes[] | are the encoded parameters sent on the time of creation or execution of action in orchestrator according to the strategy. |
gasBalance()
function gasBalance() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
gasVault()
function gasVault() external view returns (address)
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
initialize(address,address,address,bytes)
function initialize(address _vaultManager, address _orchestrator, address, bytes) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
_vaultManager | address | undefined |
_orchestrator | address | undefined |
_2 | address | undefined |
_3 | bytes | undefined |
jobState(bytes32)
function jobState(bytes32) external view returns (uint256)
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
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
keeperRegistry()
function keeperRegistry() external view returns (address)
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
orchestrator()
function orchestrator() external view returns (address)
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
owner()
function owner() external view returns (address)
Returns the address of the current owner.
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
registerJob(bytes[],address[],string,string)
function registerJob(bytes[] _userProvidedData, address[] _targetAddresses, string _name, string _ipfsForJobDetails) external nonpayable
Use this function to register jobs.
Parameters
Name | Type | Description |
---|---|---|
_userProvidedData | bytes[] | are the calldatas that are provided by the user at the registration time. |
_targetAddresses | address[] | are the addresses of the contracts on which the jobs needs to be executed. |
_name | string | should be the name of the job. |
_ipfsForJobDetails | string | is the ipfs hash containing job details like the interval for job execution. |
registerJobAndDepositGas(bytes[],address[],string,string)
function registerJobAndDepositGas(bytes[] _userProvidedData, address[] _targetAddresses, string _name, string _ipfsForJobDetails) external payable
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
Name | Type | Description |
---|---|---|
_userProvidedData | bytes[] | are the calldatas that are provided by the user at the registration time. |
_targetAddresses | address[] | are the addresses of the contracts on which the jobs needs to be executed. |
_name | string | is the name of the job. |
_ipfsForJobDetails | string | is the ipfs hash containing job details like the interval for job execution. |
renounceOwnership()
function renounceOwnership() external nonpayable
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)
function setJobState(bytes32 _jobHash, uint256 _toggle) external nonpayable
Use this function to pause or unpause a job
Parameters
Name | Type | Description |
---|---|---|
_jobHash | bytes32 | is the keccak of encoded parameters and target addresses |
_toggle | uint256 | pass 1 to pause the job and pass 2 to unpause the job |
transferOwnership(address)
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Parameters
Name | Type | Description |
---|---|---|
newOwner | address | undefined |
withdrawGas(uint256,address)
function withdrawGas(uint256 _amount, address payable to) external nonpayable
Use this function to withdraw gas associated to this vaultOnly creator of this vault can call this function
Parameters
Name | Type | Description |
---|---|---|
_amount | uint256 | is the amount of ether in wei that creator of this contract wants to pull out |
to | address payable | is the address at which the creator wants to pull the deposited ether out |
Events
JobExecuted
event JobExecuted(bytes32 jobHash, address executor)
Parameters
Name | Type | Description |
---|---|---|
jobHash | bytes32 | undefined |
executor | address | undefined |
JobRegistered
event JobRegistered(bytes[] jobInfo, address[] targetAddresses, bytes32 jobHash, string name, string ipfsForJobDetails)
Parameters
Name | Type | Description |
---|---|---|
jobInfo | bytes[] | undefined |
targetAddresses | address[] | undefined |
jobHash | bytes32 | undefined |
name | string | undefined |
ipfsForJobDetails | string | undefined |
JobToggledByCreator
event JobToggledByCreator(bytes32 jobHash, uint256 toggle)
Parameters
Name | Type | Description |
---|---|---|
jobHash | bytes32 | undefined |
toggle | uint256 | undefined |
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
Name | Type | Description |
---|---|---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |