IGasVault.sol
Methods
deposit(address)
Solidity
function deposit(address targetAddress) external payable
Parameters
Name | Type | Description |
---|---|---|
targetAddress | address | undefined |
gasAvailableForTransaction(address)
Solidity
function gasAvailableForTransaction(address targetAddress) external view 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). |
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
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. |
newActionHash | bytes32 | undefined |
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
Name | Type | Description |
---|---|---|
targetAddress | address | is address actions will be performed on, and address paying gas for those actions. |
highGasEstimate | uint256 | is highest reasonable gas price assumed for the actions |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | total transactions remaining, assuming max gas is used in each Method |
withdraw(uint256,address)
Solidity
function withdraw(uint256 amount, address payable to) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | undefined |
to | address payable | undefined |
Events
Deposited
Solidity
event Deposited(address indexed origin, address indexed target, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
origin indexed | address | undefined |
target indexed | address | undefined |
amount | uint256 | undefined |
EtherUsed
Solidity
event EtherUsed(address indexed account, uint256 amount, bytes32 jobHash)
Parameters
Name | Type | Description |
---|---|---|
account indexed | address | undefined |
amount | uint256 | undefined |
jobHash | bytes32 | undefined |
Withdrawn
Solidity
event Withdrawn(address indexed targetAddress, address indexed to, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
targetAddress indexed | address | undefined |
to indexed | address | undefined |
amount | uint256 | undefined |