GasVault.sol
vault for storing gas for each strategy. Nodes must still pay gas cost to call, but execution costs will come out of the gas account.
Methods
deposit(address)
function deposit(address targetAddress) external payable
deposit more eth to be used in jobs
Parameters
Name | Type | Description |
---|---|---|
targetAddress | address | undefined |
ethBalances(address)
function ethBalances(address) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
initialize(address,address,address)
function initialize(address _orchestrator, address _stratRegistry, address _vaultRegistry) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
_orchestrator | address | undefined |
_stratRegistry | address | undefined |
_vaultRegistry | address | undefined |
orchestrator()
function orchestrator() external view returns (contract IOrchestrator)
Returns
Name | Type | Description |
---|---|---|
_0 | contract IOrchestrator | undefined |
owner()
function owner() external view returns (address)
Returns the address of the current owner.
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
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.
returnGas(address,uint256)
function returnGas(address targetAddress, uint256 originalGas) external nonpayable
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)
function setAsideGas(address _targetAddress) external nonpayable returns (uint256)
a function that calls setAsideGas MUST call returnGas! TODO: make this into a flashloan type thing? Have it simply call the orchestrator and then continue with the function?
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). |
strategyRegistry()
function strategyRegistry() external view returns (contract IStrategyRegistry)
Returns
Name | Type | Description |
---|---|---|
_0 | contract IStrategyRegistry | undefined |
transactionsRemaining(address,uint256)
function transactionsRemaining(address targetAddress, uint256 gasCostEstimate) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
targetAddress | address | undefined |
gasCostEstimate | uint256 | represents best guess of gas cost going forwards |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | transactions remaining, assuming max gas is used in each Method |
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 |
upgradeTo(address)
function upgradeTo(address newImplementation) external nonpayable
Upgrade the implementation of the proxy to newImplementation
. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
Name | Type | Description |
---|---|---|
newImplementation | address | undefined |
upgradeToAndCall(address,bytes)
function upgradeToAndCall(address newImplementation, bytes data) external payable
Upgrade the implementation of the proxy to newImplementation
, and subsequently execute the function call encoded in data
. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
Name | Type | Description |
---|---|---|
newImplementation | address | undefined |
data | bytes | undefined |
vaultRegistry()
function vaultRegistry() external view returns (contract IVaultRegistry)
Returns
Name | Type | Description |
---|---|---|
_0 | contract IVaultRegistry | undefined |
withdraw(uint256)
function withdraw(uint256 amount) external nonpayable
withdraws eth from vault
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | undefined |
Events
AdminChanged
event AdminChanged(address previousAdmin, address newAdmin)
Parameters
Name | Type | Description |
---|---|---|
previousAdmin | address | undefined |
newAdmin | address | undefined |
BeaconUpgraded
event BeaconUpgraded(address indexed beacon)
Parameters
Name | Type | Description |
---|---|---|
beacon indexed | address | undefined |
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
Name | Type | Description |
---|---|---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |
Upgraded
event Upgraded(address indexed implementation)
Parameters
Name | Type | Description |
---|---|---|
implementation indexed | address | undefined |
deposited
event deposited(address origin, address target, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
origin | address | undefined |
target | address | undefined |
amount | uint256 | undefined |
etherUsed
event etherUsed(address account, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
amount | uint256 | undefined |
withdrawn
event withdrawn(address account, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
amount | uint256 | undefined |