EnterMarkets

Compound V2 Action Plugin - EnterMarkets

Description

Enter into a list of markets - it is not an error to enter the same market more than once. In order to supply collateral or borrow in a market, it must be entered first.

Method

enterMarkets(address[])

Input Parameters

No input parameters necessary

Method Parameters

NamePlugin TypeDescription

cTokens

FctAddressList

The addresses of the cToken markets to enter.

Returned Values

No returned values

Example

Example with initParams

const enterMarkets = new CompoundV2.actions.EnterMarkets({
   chainId: 1,
   initParams: {
     methodParams: {
       cTokens: ["0x...", "0x..."]
     }
   }
})

Example without initParams

const enterMarkets = new CompoundV2.actions.EnterMarkets({ chainId: 1 })

enterMarkets.input.set({
     methodParams: {
       cTokens: ["0x...", "0x..."]
     }
})

Learn more

Learn more about Compound V2 enter markets method here

Last updated