yearn-vaults / Modules / BaseWrapper / BaseWrapper
Class: BaseWrapper
BaseWrapper.BaseWrapper
Hierarchy
BaseContract
↳ BaseWrapper
Table of contents
Constructors
Properties
- _deployedPromise
- _runningEvents
- _wrappedEmits
- address
- callStatic
- deployTransaction
- estimateGas
- filters
- functions
- interface
- populateTransaction
- provider
- resolvedAddress
- signer
Methods
- _checkRunningEvents
- _deployed
- _wrapEvent
- allVaults()
- allVaults(address)
- attach
- bestVault()
- bestVault(address)
- connect
- deployed
- emit
- fallback
- listenerCount
- listeners
- off
- on
- once
- queryFilter
- registry
- removeAllListeners
- removeListener
- setRegistry
- token
- totalAssets()
- totalAssets(address)
- totalVaultBalance(address)
- totalVaultBalance(address,address)
- getContractAddress
- getInterface
- isIndexed
Constructors
constructor
• new BaseWrapper(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 |
---|---|
allVaults() |
(overrides? : CallOverrides ) => Promise <string []> |
allVaults(address) |
(token : string , overrides? : CallOverrides ) => Promise <string []> |
bestVault() |
(overrides? : CallOverrides ) => Promise <string > |
bestVault(address) |
(token : string , overrides? : CallOverrides ) => Promise <string > |
registry |
(overrides? : CallOverrides ) => Promise <string > |
setRegistry |
(_registry : string , overrides? : CallOverrides ) => Promise <void > |
token |
(overrides? : CallOverrides ) => Promise <string > |
totalAssets() |
(overrides? : CallOverrides ) => Promise <BigNumber > |
totalAssets(address) |
(token : string , overrides? : CallOverrides ) => Promise <BigNumber > |
totalVaultBalance(address) |
(account : string , overrides? : CallOverrides ) => Promise <BigNumber > |
totalVaultBalance(address,address) |
(token : string , account : string , overrides? : CallOverrides ) => Promise <BigNumber > |
Overrides
BaseContract.callStatic
Defined in
typechain/BaseWrapper.d.ts:194
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 |
---|---|
allVaults() |
(overrides? : CallOverrides ) => Promise <BigNumber > |
allVaults(address) |
(token : string , overrides? : CallOverrides ) => Promise <BigNumber > |
bestVault() |
(overrides? : CallOverrides ) => Promise <BigNumber > |
bestVault(address) |
(token : string , overrides? : CallOverrides ) => Promise <BigNumber > |
registry |
(overrides? : CallOverrides ) => Promise <BigNumber > |
setRegistry |
(_registry : string , overrides? : Overrides & { from? : string | Promise <string > }) => Promise <BigNumber > |
token |
(overrides? : CallOverrides ) => Promise <BigNumber > |
totalAssets() |
(overrides? : CallOverrides ) => Promise <BigNumber > |
totalAssets(address) |
(token : string , overrides? : CallOverrides ) => Promise <BigNumber > |
totalVaultBalance(address) |
(account : string , overrides? : CallOverrides ) => Promise <BigNumber > |
totalVaultBalance(address,address) |
(token : string , account : string , overrides? : CallOverrides ) => Promise <BigNumber > |
Overrides
BaseContract.estimateGas
Defined in
typechain/BaseWrapper.d.ts:236
filters
• filters: Object
Overrides
BaseContract.filters
Defined in
typechain/BaseWrapper.d.ts:234
functions
• functions: Object
Type declaration
Name | Type |
---|---|
allVaults() |
(overrides? : CallOverrides ) => Promise <[string []]> |
allVaults(address) |
(token : string , overrides? : CallOverrides ) => Promise <[string []]> |
bestVault() |
(overrides? : CallOverrides ) => Promise <[string ]> |
bestVault(address) |
(token : string , overrides? : CallOverrides ) => Promise <[string ]> |
registry |
(overrides? : CallOverrides ) => Promise <[string ]> |
setRegistry |
(_registry : string , overrides? : Overrides & { from? : string | Promise <string > }) => Promise <ContractTransaction > |
token |
(overrides? : CallOverrides ) => Promise <[string ]> |
totalAssets() |
(overrides? : CallOverrides ) => Promise <[BigNumber ]> |
totalAssets(address) |
(token : string , overrides? : CallOverrides ) => Promise <[BigNumber ] & { assets : BigNumber }> |
totalVaultBalance(address) |
(account : string , overrides? : CallOverrides ) => Promise <[BigNumber ]> |
totalVaultBalance(address,address) |
(token : string , account : string , overrides? : CallOverrides ) => Promise <[BigNumber ] & { balance : BigNumber }> |
Overrides
BaseContract.functions
Defined in
typechain/BaseWrapper.d.ts:110
interface
• interface: BaseWrapperInterface
Overrides
BaseContract.interface
Defined in
typechain/BaseWrapper.d.ts:108
populateTransaction
• populateTransaction: Object
Type declaration
Name | Type |
---|---|
allVaults() |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
allVaults(address) |
(token : string , overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
bestVault() |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
bestVault(address) |
(token : string , overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
registry |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
setRegistry |
(_registry : string , overrides? : Overrides & { from? : string | Promise <string > }) => Promise <PopulatedTransaction > |
token |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
totalAssets() |
(overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
totalAssets(address) |
(token : string , overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
totalVaultBalance(address) |
(account : string , overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
totalVaultBalance(address,address) |
(token : string , account : string , overrides? : CallOverrides ) => Promise <PopulatedTransaction > |
Overrides
BaseContract.populateTransaction
Defined in
typechain/BaseWrapper.d.ts:279
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
allVaults()
▸ allVaults()(overrides?
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<string
[]>
Defined in
typechain/BaseWrapper.d.ts:153
allVaults(address)
▸ allVaults(address)(token
, overrides?
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
token |
string |
overrides? |
CallOverrides |
Returns
Promise
<string
[]>
Defined in
typechain/BaseWrapper.d.ts:155
attach
▸ attach(addressOrName
): BaseWrapper
Parameters
Name | Type |
---|---|
addressOrName |
string |
Returns
Overrides
BaseContract.attach
Defined in
typechain/BaseWrapper.d.ts:69
bestVault()
▸ bestVault()(overrides?
): Promise
<string
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<string
>
Defined in
typechain/BaseWrapper.d.ts:165
bestVault(address)
▸ bestVault(address)(token
, overrides?
): Promise
<string
>
Parameters
Name | Type |
---|---|
token |
string |
overrides? |
CallOverrides |
Returns
Promise
<string
>
Defined in
typechain/BaseWrapper.d.ts:160
connect
▸ connect(signerOrProvider
): BaseWrapper
Parameters
Name | Type |
---|---|
signerOrProvider |
string | Provider | Signer |
Returns
Overrides
BaseContract.connect
Defined in
typechain/BaseWrapper.d.ts:68
deployed
▸ deployed(): Promise
<BaseWrapper
>
Returns
Promise
<BaseWrapper
>
Overrides
BaseContract.deployed
Defined in
typechain/BaseWrapper.d.ts:70
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
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
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/BaseWrapper.d.ts:72
▸ listeners(eventName?
): Listener
[]
Parameters
Name | Type |
---|---|
eventName? |
string |
Returns
Listener
[]
Overrides
BaseContract.listeners
Defined in
typechain/BaseWrapper.d.ts:95
off
▸ off<EventArgsArray
, EventArgsObject
>(eventFilter
, listener
): BaseWrapper
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/BaseWrapper.d.ts:75
▸ off(eventName
, listener
): BaseWrapper
Parameters
Name | Type |
---|---|
eventName |
string |
listener |
Listener |
Returns
Overrides
BaseContract.off
Defined in
typechain/BaseWrapper.d.ts:96
on
▸ on<EventArgsArray
, EventArgsObject
>(eventFilter
, listener
): BaseWrapper
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/BaseWrapper.d.ts:79
▸ on(eventName
, listener
): BaseWrapper
Parameters
Name | Type |
---|---|
eventName |
string |
listener |
Listener |
Returns
Overrides
BaseContract.on
Defined in
typechain/BaseWrapper.d.ts:97
once
▸ once<EventArgsArray
, EventArgsObject
>(eventFilter
, listener
): BaseWrapper
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/BaseWrapper.d.ts:83
▸ once(eventName
, listener
): BaseWrapper
Parameters
Name | Type |
---|---|
eventName |
string |
listener |
Listener |
Returns
Overrides
BaseContract.once
Defined in
typechain/BaseWrapper.d.ts:98
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/BaseWrapper.d.ts:102
registry
▸ registry(overrides?
): Promise
<string
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<string
>
Defined in
typechain/BaseWrapper.d.ts:167
removeAllListeners
▸ removeAllListeners<EventArgsArray
, EventArgsObject
>(eventFilter
): BaseWrapper
Type parameters
Name | Type |
---|---|
EventArgsArray |
extends any [] |
EventArgsObject |
EventArgsObject |
Parameters
Name | Type |
---|---|
eventFilter |
TypedEventFilter <EventArgsArray , EventArgsObject > |
Returns
Overrides
BaseContract.removeAllListeners
Defined in
typechain/BaseWrapper.d.ts:91
▸ removeAllListeners(eventName?
): BaseWrapper
Parameters
Name | Type |
---|---|
eventName? |
string |
Returns
Overrides
BaseContract.removeAllListeners
Defined in
typechain/BaseWrapper.d.ts:100
removeListener
▸ removeListener<EventArgsArray
, EventArgsObject
>(eventFilter
, listener
): BaseWrapper
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/BaseWrapper.d.ts:87
▸ removeListener(eventName
, listener
): BaseWrapper
Parameters
Name | Type |
---|---|
eventName |
string |
listener |
Listener |
Returns
Overrides
BaseContract.removeListener
Defined in
typechain/BaseWrapper.d.ts:99
setRegistry
▸ setRegistry(_registry
, overrides?
): Promise
<ContractTransaction
>
Parameters
Name | Type |
---|---|
_registry |
string |
overrides? |
Overrides & { from? : string | Promise <string > } |
Returns
Promise
<ContractTransaction
>
Defined in
typechain/BaseWrapper.d.ts:169
token
▸ token(overrides?
): Promise
<string
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<string
>
Defined in
typechain/BaseWrapper.d.ts:174
totalAssets()
▸ totalAssets()(overrides?
): Promise
<BigNumber
>
Parameters
Name | Type |
---|---|
overrides? |
CallOverrides |
Returns
Promise
<BigNumber
>
Defined in
typechain/BaseWrapper.d.ts:176
totalAssets(address)
▸ totalAssets(address)(token
, overrides?
): Promise
<BigNumber
>
Parameters
Name | Type |
---|---|
token |
string |
overrides? |
CallOverrides |
Returns
Promise
<BigNumber
>
Defined in
typechain/BaseWrapper.d.ts:178
totalVaultBalance(address)
▸ totalVaultBalance(address)(account
, overrides?
): Promise
<BigNumber
>
Parameters
Name | Type |
---|---|
account |
string |
overrides? |
CallOverrides |
Returns
Promise
<BigNumber
>
Defined in
typechain/BaseWrapper.d.ts:189
totalVaultBalance(address,address)
▸ totalVaultBalance(address,address)(token
, account
, overrides?
): Promise
<BigNumber
>
Parameters
Name | Type |
---|---|
token |
string |
account |
string |
overrides? |
CallOverrides |
Returns
Promise
<BigNumber
>
Defined in
typechain/BaseWrapper.d.ts:183
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