Skip to main content

IGasVault.sol

Methods

deposit(address)

Solidity

function deposit(address targetAddress) external payable

Parameters

NameTypeDescription
targetAddressaddressundefined

returnGas(address,uint256)

Solidity

function returnGas(address targetAddress, uint256 originalGas) 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.

setAsideGas(address)

Solidity

function setAsideGas(address targetAddress) external nonpayable 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).

transactionsRemaining(address,uint256)

Solidity

function transactionsRemaining(address targetAddress, uint256 gasCostEstimate) 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
targetAddressaddressundefined
gasCostEstimateuint256represents best guess of gas cost going forwards

Returns

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

withdraw(uint256)

Solidity

function withdraw(uint256 amount) external nonpayable
Details

Withdraws given amount of ether from the vault.

Parameters

NameTypeDescription
amountuint256Amount of ether to withdraw, in terms of wei.

Events

deposited

Solidity

event deposited(address origin, address target, uint256 amount)

Parameters

NameTypeDescription
originaddressundefined
targetaddressundefined
amountuint256undefined

etherUsed

Solidity

event etherUsed(address account, uint256 amount)

Parameters

NameTypeDescription
accountaddressundefined
amountuint256undefined

withdrawn

Solidity

event withdrawn(address account, uint256 amount)

Parameters

NameTypeDescription
accountaddressundefined
amountuint256undefined