strategy()

CarbonController.sol
    function strategy(uint256 id) external view returns (Strategy memory);
   

This function is used to get details about a strategy, specified by its ID.

Function Arguments

NameTypeDescription

id

uint256

The ID of the strategy

Returns

This function returns details about the specified strategy.

NameTypeDescription

id

uint256

The ID of the strategy

owner

address

The address of the owner of the strategy

tokens

array

An array containing the addresses of token0 and token1

orders

array

An array containing the order objects that specify the parameters of each order contained by the strategy

Example

strategy(
 888 //strategy id
)

// returns 
// struct Strategy {
//    uint256 id;
//    address owner;
//    Token[2] tokens;
//    Order[2] orders;
// }

// [{y, z, A, B},{y, z, A, B}], // orders

Last updated