Skip to main content

IGasVault.sol

Methods

deposit(address)

Solidity

function deposit(address targetAddress) external payable

Parameters

NameTypeDescription
targetAddressaddressundefined

gasAvailableForTransaction(address)

Solidity

function gasAvailableForTransaction(address targetAddress) external view returns (uint256)

Parameters

NameTypeDescription
targetAddressaddressis address actions will be performed on, and address paying gas for those actions.

Returns

NameTypeDescription
_0uint256uint256 gasAvailable (representing amount of gas available per Method).

reimburseGas(address,uint256,bytes32)

Solidity

function reimburseGas(address targetAddress, uint256 originalGas, bytes32 newActionHash) external nonpayable
Details

should only ever be called by the orchestrator. Is onlyOrchestrator. This and setAsideGas are used to pull gas from the vault for strategy executions.

Parameters

NameTypeDescription
targetAddressaddressis address actions were performed on
originalGasuint256is gas passed in to the action execution order. Used to calculate gas used in the execution.
newActionHashbytes32undefined

transactionsRemaining(address,uint256)

Solidity

function transactionsRemaining(address targetAddress, uint256 highGasEstimate) external view returns (uint256)
Details

calculates total transactions remaining. What this means is--assuming that each method (action paid for by the strategist/job owner) costs max amount of gas at max gas price, and uses the max amount of actions, how many transactions can be paid for? In other words, how many actions can this vault guarantee.

Parameters

NameTypeDescription
targetAddressaddressis address actions will be performed on, and address paying gas for those actions.
highGasEstimateuint256is highest reasonable gas price assumed for the actions

Returns

NameTypeDescription
_0uint256total transactions remaining, assuming max gas is used in each Method

withdraw(uint256,address)

Solidity

function withdraw(uint256 amount, address payable to) external nonpayable

Parameters

NameTypeDescription
amountuint256undefined
toaddress payableundefined

Events

Deposited

Solidity

event Deposited(address indexed origin, address indexed target, uint256 amount)

Parameters

NameTypeDescription
origin indexedaddressundefined
target indexedaddressundefined
amountuint256undefined

EtherUsed

Solidity

event EtherUsed(address indexed account, uint256 amount, bytes32 jobHash)

Parameters

NameTypeDescription
account indexedaddressundefined
amountuint256undefined
jobHashbytes32undefined

Withdrawn

Solidity

event Withdrawn(address indexed targetAddress, address indexed to, uint256 amount)

Parameters

NameTypeDescription
targetAddress indexedaddressundefined
to indexedaddressundefined
amountuint256undefined