yearn-vaults / Modules / StrategyAPI / StrategyAPI
Class: StrategyAPI
StrategyAPI.StrategyAPI
Hierarchy
BaseContract
↳ StrategyAPI
Table of contents
Constructors
Properties
- _deployedPromise
- _runningEvents
- _wrappedEmits
- address
- callStatic
- deployTransaction
- estimateGas
- filters
- functions
- interface
- populateTransaction
- provider
- resolvedAddress
- signer
Methods
- _checkRunningEvents
- _deployed
- _wrapEvent
- apiVersion
- attach
- connect
- delegatedAssets
- deployed
- emit
- estimatedTotalAssets
- fallback
- harvest
- harvestTrigger
- isActive
- keeper
- listenerCount
- listeners
- name
- off
- on
- once
- queryFilter
- removeAllListeners
- removeListener
- tend
- tendTrigger
- vault
- want
- getContractAddress
- getInterface
- isIndexed
Constructors
constructor
• new StrategyAPI(addressOrName
, contractInterface
, signerOrProvider?
)
Parameters
Name | Type |
---|---|
addressOrName |
string |
contractInterface |
ContractInterface |
signerOrProvider? |
Signer | Provider |
Inherited from
BaseContract.constructor
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:103
Properties
_deployedPromise
• _deployedPromise: Promise
<Contract
>
Inherited from
BaseContract._deployedPromise
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:96
_runningEvents
• _runningEvents: Object
Index signature
▪ [eventTag: string
]: RunningEvent
Inherited from
BaseContract._runningEvents
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:97
_wrappedEmits
• _wrappedEmits: Object
Index signature
▪ [eventTag: string
]: (…args
: any
[]) => void
Inherited from
BaseContract._wrappedEmits
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:100
address
• Readonly
address: string
Inherited from
BaseContract.address
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:75
callStatic
• callStatic: Object
Type declaration
Name | Type |
---|---|
apiVersion |
(overrides? : CallOverrides ) => Promise <string > |
delegatedAssets |
(overrides? : CallOverrides ) => Promise <BigNumber > |
estimatedTotalAssets |
(overrides? : CallOverrides ) => Promise <BigNumber > |
harvest |
(overrides? : CallOverrides ) => Promise <void > |
harvestTrigger |
(callCost : BigNumberish , overrides? : CallOverrides ) => Promise <boolean > |
isActive |
(overrides? : CallOverrides ) => Promise <boolean > |
keeper |
(overrides? : CallOverrides ) => Promise <string > |
name |
(overrides? : CallOverrides ) => Promise <string > |
tend |
(overrides? : CallOverrides ) => Promise <void > |
tendTrigger |
(callCost : BigNumberish , overrides? : CallOverrides ) => Promise <boolean > |
vault |
(overrides? : CallOverrides ) => Promise <string > |
want |
(overrides? : CallOverrides ) => Promise <string > |
Overrides
BaseContract.callStatic
Defined in
typechain/StrategyAPI.d.ts:220
deployTransaction
• Readonly
deployTransaction: TransactionResponse
Inherited from
BaseContract.deployTransaction
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:95
estimateGas
• estimateGas: Object
Type declaration
Name | Type |
---|---|
apiVersion |
(overrides? : CallOverrides ) => Promise <BigNumber > |
delegatedAssets |
(overrides? : CallOverrides ) => Promise <BigNumber > |
estimatedTotalAssets |
(overrides? : CallOverrides ) => Promise <BigNumber > |
harvest |
(overrides? : Overrides & { from? : string | Promise <string > }) => Promise <BigNumber > |
harvestTrigger |
(callCost : BigNumberish , overrides? : CallOverrides ) => Promise <BigNumber > |
isActive |
(overrides? : CallOverrides ) => Promise <BigNumber > |
keeper |
(overrides? : CallOverrides ) => Promise <BigNumber > |
name |
(overrides? : CallOverrides ) => Promise <BigNumber > |
tend |
(overrides? : Overrides & { from? : string | Promise <string > }) => Promise <BigNumber > |
tendTrigger |
(callCost : BigNumberish , overrides? : CallOverrides ) => Promise <BigNumber > |
vault |
(overrides? : CallOverrides ) => Promise <BigNumber > |
want |
(overrides? : CallOverrides ) => Promise <BigNumber > |
Overrides
BaseContract.estimateGas
Defined in
typechain/StrategyAPI.d.ts:284
filters
• filters: Object
Type declaration
Name | Type |
---|---|
Harvested |
(profit? : null , loss? : null , debtPayment? : null , debtOutstanding? : null ) => TypedEventFilter <[BigNumber , BigNumber , BigNumber , BigNumber ], Object > |
Harvested(uint256,uint256,uint256,uint256) |
(profit? : null , loss? : null , debtPayment? : null , debtOutstanding? : null ) => TypedEventFilter <[BigNumber , BigNumber , BigNumber , BigNumber ], Object > |
Overrides
BaseContract.filters
Defined in
typechain/StrategyAPI.d.ts:252
functions
• functions: Object
Type declaration
Name | Type |
---|---|
apiVersion |
(overrides? : CallOverrides ) => Promise <[string ]> |
delegatedAssets |
(overrides? : CallOverrides ) => Promise <[BigNumber ]> |
estimatedTotalAssets |
(overrides? : CallOverrides ) => Promise <[BigNumber ]> |
harvest |
(overrides? : Overrides & { from? : string | Promise <string > }) => Promise <ContractTransaction > |
harvestTrigger |
(callCost : BigNumberish , overrides? : CallOverrides ) => Promise <[boolean ]> |
isActive |
(overrides? : CallOverrides ) => Promise <[boolean ]> |
keeper |
(overrides? : CallOverrides ) => Promise <[string ]> |
name |
(overrides? : CallOverrides ) => Promise <[string ]> |
tend |
(overrides? : Overrides & { from? : string | Promise <string > }) => Promise <ContractTransaction > |
tendTrigger |
(callCost : BigNumberish , overrides? : CallOverrides ) => Promise <[boolean ]> |
vault |
(overrides? : CallOverrides ) => Promise <[string ]> |
want |
(overrides? : CallOverrides ) => Promise <[string ]> |
Overrides
BaseContract.functions
Defined in
typechain/StrategyAPI.d.ts:150
interface
• interface: StrategyAPIInterface
Overrides
BaseContract.interface
Defined in
typechain/StrategyAPI.d.ts:148
populateTransaction
• populateTransaction: Object
Type declaration
Name | Type |
---|---|
apiVersion |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
delegatedAssets |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
estimatedTotalAssets |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
harvest |
(overrides? : Overrides & { from? : string | Promise <string > }) => Promise <PopulatedTransaction > |
harvestTrigger |
(callCost : BigNumberish , overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
isActive |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
keeper |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
name |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
tend |
(overrides? : Overrides & { from? : string | Promise <string > }) => Promise <PopulatedTransaction > |
tendTrigger |
(callCost : BigNumberish , overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
vault |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
want |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
Overrides
BaseContract.populateTransaction
Defined in
typechain/StrategyAPI.d.ts:320
provider
• Readonly
provider: Provider
Inherited from
BaseContract.provider
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:78
resolvedAddress
• Readonly
resolvedAddress: Promise
<string
>
Inherited from
BaseContract.resolvedAddress
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:94
signer
• Readonly
signer: Signer
Inherited from
BaseContract.signer
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:77
Methods
_checkRunningEvents
▸ _checkRunningEvents(runningEvent
): void
Parameters
Name | Type |
---|---|
runningEvent |
RunningEvent |
Returns
void
Inherited from
BaseContract._checkRunningEvents
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:117
_deployed
▸ _deployed(blockTag?
): Promise
<Contract
>
Parameters
Name | Type |
---|---|
blockTag? |
BlockTag |
Returns
Promise
<Contract
>
Inherited from
BaseContract._deployed
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:110
_wrapEvent
▸ _wrapEvent(runningEvent
, log
, listener
): Event
Parameters
Name | Type |
---|---|
runningEvent |
RunningEvent |
log |
Log |
listener |
Listener |
Returns
Event
Inherited from
BaseContract._wrapEvent
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:118
apiVersion
▸ apiVersion(overrides?
): Promise
<string
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<string
>
Defined in
typechain/StrategyAPI.d.ts:186
attach
▸ attach(addressOrName
): StrategyAPI
Parameters
Name | Type |
---|---|
addressOrName |
string |
Returns
Overrides
BaseContract.attach
Defined in
typechain/StrategyAPI.d.ts:109
connect
▸ connect(signerOrProvider
): StrategyAPI
Parameters
Name | Type |
---|---|
signerOrProvider |
string | Provider | Signer |
Returns
Overrides
BaseContract.connect
Defined in
typechain/StrategyAPI.d.ts:108
delegatedAssets
▸ delegatedAssets(overrides?
): Promise
<BigNumber
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<BigNumber
>
Defined in
typechain/StrategyAPI.d.ts:188
deployed
▸ deployed(): Promise
<StrategyAPI
>
Returns
Promise
<StrategyAPI
>
Overrides
BaseContract.deployed
Defined in
typechain/StrategyAPI.d.ts:110
emit
▸ emit(eventName
, …args
): boolean
Parameters
Name | Type |
---|---|
eventName |
string | EventFilter |
...args |
any [] |
Returns
boolean
Inherited from
BaseContract.emit
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:123
estimatedTotalAssets
▸ estimatedTotalAssets(overrides?
): Promise
<BigNumber
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<BigNumber
>
Defined in
typechain/StrategyAPI.d.ts:190
fallback
▸ fallback(overrides?
): Promise
<TransactionResponse
>
Parameters
Name | Type |
---|---|
overrides? |
TransactionRequest |
Returns
Promise
<TransactionResponse
>
Inherited from
BaseContract.fallback
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:111
harvest
▸ harvest(overrides?
): Promise
<ContractTransaction
>
Parameters
Name | Type |
---|---|
overrides? |
Overrides & { from? : string | Promise <string > } |
Returns
Promise
<ContractTransaction
>
Defined in
typechain/StrategyAPI.d.ts:192
harvestTrigger
▸ harvestTrigger(callCost
, overrides?
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
callCost |
BigNumberish |
overrides? |
CallOverrides |
Returns
Promise
<boolean
>
Defined in
typechain/StrategyAPI.d.ts:196
isActive
▸ isActive(overrides?
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<boolean
>
Defined in
typechain/StrategyAPI.d.ts:201
keeper
▸ keeper(overrides?
): Promise
<string
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<string
>
Defined in
typechain/StrategyAPI.d.ts:203
listenerCount
▸ listenerCount(eventName?
): number
Parameters
Name | Type |
---|---|
eventName? |
string | EventFilter |
Returns
number
Inherited from
BaseContract.listenerCount
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:124
listeners
▸ listeners<EventArgsArray
, EventArgsObject
>(eventFilter?
): TypedListener
<EventArgsArray
, EventArgsObject
>[]
Type parameters
Name | Type |
---|---|
EventArgsArray |
extends any [] |
EventArgsObject |
EventArgsObject |
Parameters
Name | Type |
---|---|
eventFilter? |
TypedEventFilter <EventArgsArray , EventArgsObject > |
Returns
TypedListener
<EventArgsArray
, EventArgsObject
>[]
Overrides
BaseContract.listeners
Defined in
typechain/StrategyAPI.d.ts:112
▸ listeners(eventName?
): Listener
[]
Parameters
Name | Type |
---|---|
eventName? |
string |
Returns
Listener
[]
Overrides
BaseContract.listeners
Defined in
typechain/StrategyAPI.d.ts:135
name
▸ name(overrides?
): Promise
<string
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<string
>
Defined in
typechain/StrategyAPI.d.ts:205
off
▸ off<EventArgsArray
, EventArgsObject
>(eventFilter
, listener
): StrategyAPI
Type parameters
Name | Type |
---|---|
EventArgsArray |
extends any [] |
EventArgsObject |
EventArgsObject |
Parameters
Name | Type |
---|---|
eventFilter |
TypedEventFilter <EventArgsArray , EventArgsObject > |
listener |
TypedListener <EventArgsArray , EventArgsObject > |
Returns
Overrides
BaseContract.off
Defined in
typechain/StrategyAPI.d.ts:115
▸ off(eventName
, listener
): StrategyAPI
Parameters
Name | Type |
---|---|
eventName |
string |
listener |
Listener |
Returns
Overrides
BaseContract.off
Defined in
typechain/StrategyAPI.d.ts:136
on
▸ on<EventArgsArray
, EventArgsObject
>(eventFilter
, listener
): StrategyAPI
Type parameters
Name | Type |
---|---|
EventArgsArray |
extends any [] |
EventArgsObject |
EventArgsObject |
Parameters
Name | Type |
---|---|
eventFilter |
TypedEventFilter <EventArgsArray , EventArgsObject > |
listener |
TypedListener <EventArgsArray , EventArgsObject > |
Returns
Overrides
BaseContract.on
Defined in
typechain/StrategyAPI.d.ts:119
▸ on(eventName
, listener
): StrategyAPI
Parameters
Name | Type |
---|---|
eventName |
string |
listener |
Listener |
Returns
Overrides
BaseContract.on
Defined in
typechain/StrategyAPI.d.ts:137
once
▸ once<EventArgsArray
, EventArgsObject
>(eventFilter
, listener
): StrategyAPI
Type parameters
Name | Type |
---|---|
EventArgsArray |
extends any [] |
EventArgsObject |
EventArgsObject |
Parameters
Name | Type |
---|---|
eventFilter |
TypedEventFilter <EventArgsArray , EventArgsObject > |
listener |
TypedListener <EventArgsArray , EventArgsObject > |
Returns
Overrides
BaseContract.once
Defined in
typechain/StrategyAPI.d.ts:123
▸ once(eventName
, listener
): StrategyAPI
Parameters
Name | Type |
---|---|
eventName |
string |
listener |
Listener |
Returns
Overrides
BaseContract.once
Defined in
typechain/StrategyAPI.d.ts:138
queryFilter
▸ queryFilter<EventArgsArray
, EventArgsObject
>(event
, fromBlockOrBlockhash?
, toBlock?
): Promise
<TypedEvent
<EventArgsArray
& EventArgsObject
>[]>
Type parameters
Name | Type |
---|---|
EventArgsArray |
extends any [] |
EventArgsObject |
EventArgsObject |
Parameters
Name | Type |
---|---|
event |
TypedEventFilter <EventArgsArray , EventArgsObject > |
fromBlockOrBlockhash? |
string | number |
toBlock? |
string | number |
Returns
Promise
<TypedEvent
<EventArgsArray
& EventArgsObject
>[]>
Overrides
BaseContract.queryFilter
Defined in
typechain/StrategyAPI.d.ts:142
removeAllListeners
▸ removeAllListeners<EventArgsArray
, EventArgsObject
>(eventFilter
): StrategyAPI
Type parameters
Name | Type |
---|---|
EventArgsArray |
extends any [] |
EventArgsObject |
EventArgsObject |
Parameters
Name | Type |
---|---|
eventFilter |
TypedEventFilter <EventArgsArray , EventArgsObject > |
Returns
Overrides
BaseContract.removeAllListeners
Defined in
typechain/StrategyAPI.d.ts:131
▸ removeAllListeners(eventName?
): StrategyAPI
Parameters
Name | Type |
---|---|
eventName? |
string |
Returns
Overrides
BaseContract.removeAllListeners
Defined in
typechain/StrategyAPI.d.ts:140
removeListener
▸ removeListener<EventArgsArray
, EventArgsObject
>(eventFilter
, listener
): StrategyAPI
Type parameters
Name | Type |
---|---|
EventArgsArray |
extends any [] |
EventArgsObject |
EventArgsObject |
Parameters
Name | Type |
---|---|
eventFilter |
TypedEventFilter <EventArgsArray , EventArgsObject > |
listener |
TypedListener <EventArgsArray , EventArgsObject > |
Returns
Overrides
BaseContract.removeListener
Defined in
typechain/StrategyAPI.d.ts:127
▸ removeListener(eventName
, listener
): StrategyAPI
Parameters
Name | Type |
---|---|
eventName |
string |
listener |
Listener |
Returns
Overrides
BaseContract.removeListener
Defined in
typechain/StrategyAPI.d.ts:139
tend
▸ tend(overrides?
): Promise
<ContractTransaction
>
Parameters
Name | Type |
---|---|
overrides? |
Overrides & { from? : string | Promise <string > } |
Returns
Promise
<ContractTransaction
>
Defined in
typechain/StrategyAPI.d.ts:207
tendTrigger
▸ tendTrigger(callCost
, overrides?
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
callCost |
BigNumberish |
overrides? |
CallOverrides |
Returns
Promise
<boolean
>
Defined in
typechain/StrategyAPI.d.ts:211
vault
▸ vault(overrides?
): Promise
<string
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<string
>
Defined in
typechain/StrategyAPI.d.ts:216
want
▸ want(overrides?
): Promise
<string
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<string
>
Defined in
typechain/StrategyAPI.d.ts:218
getContractAddress
▸ Static
getContractAddress(transaction
): string
Parameters
Name | Type |
---|---|
transaction |
Object |
transaction.from |
string |
transaction.nonce |
BigNumberish |
Returns
string
Inherited from
BaseContract.getContractAddress
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:104
getInterface
▸ Static
getInterface(contractInterface
): Interface
Parameters
Name | Type |
---|---|
contractInterface |
ContractInterface |
Returns
Interface
Inherited from
BaseContract.getInterface
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:108
isIndexed
▸ Static
isIndexed(value
): value is Indexed
Parameters
Name | Type |
---|---|
value |
any |
Returns
value is Indexed
Inherited from
BaseContract.isIndexed
Defined in
node_modules/@ethersproject/contracts/lib/index.d.ts:114