IGasVault.sol
Methods
deposit(address)
Solidity
function deposit(address targetAddress) external payable
Parameters
Name | Type | Description |
---|---|---|
targetAddress | address | undefined |
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
Name | Type | Description |
---|---|---|
targetAddress | address | is address actions were performed on |
originalGas | uint256 | is 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
Name | Type | Description |
---|---|---|
targetAddress | address | is address actions will be performed on, and address paying gas for those actions. |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | uint256 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
Name | Type | Description |
---|---|---|
targetAddress | address | undefined |
gasCostEstimate | uint256 | represents best guess of gas cost going forwards |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | total 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
Name | Type | Description |
---|---|---|
amount | uint256 | Amount of ether to withdraw, in terms of wei. |
Events
deposited
Solidity
event deposited(address origin, address target, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
origin | address | undefined |
target | address | undefined |
amount | uint256 | undefined |
etherUsed
Solidity
event etherUsed(address account, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
amount | uint256 | undefined |
withdrawn
Solidity
event withdrawn(address account, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
amount | uint256 | undefined |