Closed Sk8erboi84 closed 1 year ago
Implement the get_market function in the Reader contract.
get_market
Reader
File: src/reader/reader.cairo.
src/reader/reader.cairo
Function signature:
fn get_market(data_store: IDataStoreDispatcher, key: ContractAddress) -> Market;
Implement the get_market_by_salt function in the Reader contract.
get_market_by_salt
fn get_market_by_salt(data_store: IDataStoreDispatcher, salt: felt252) -> Market;
Implement the get_deposit function in the Reader contract.
get_deposit
fn get_deposit(data_store: IDataStoreDispatcher, key: felt252) -> Deposit;
Implement the get_withdrawl function in the Reader contract.
get_withdrawl
fn get_withdrawl(data_store: IDataStoreDispatcher, key: felt252) -> Withdrawal
Implement the get_position function in the Reader contract.
get_position
fn get_position(data_store: IDataStoreDispatcher, key: felt252) -> Position;
Implement the get_order function in the Reader contract.
get_order
fn get_order(data_store: IDataStoreDispatcher, key: felt252) -> Order;
Implement the get_position_pnl_usd function in the Reader contract.
get_position_pnl_usd
fn get_position_pnl_usd( data_store: IDataStoreDispatcher, market: Market, prices: MarketPrices, position_key: felt252, size_delta_usd: u128 ) -> (i128, i128, u128)
Implement the get_account_positions function in the Reader contract.
get_account_positions
fn get_account_positions( data_store: IDataStoreDispatcher, account: ContractAddress, start: u128, end: u128 ) -> Array<Position>
Implement the get_account_position_info_list function in the Reader contract.
get_account_position_info_list
fn get_account_position_info_list( data_store: IDataStoreDispatcher, referral_storage: IReferralStorageDispatcher, position_keys: Array<felt252>, prices: Array<MarketPrices>, ui_fee_receiver: ContractAddress ) -> Array<PositionInfo>;
Implement the get_position_info function in the Reader contract.
get_position_info
fn get_position_info( data_store: IDataStoreDispatcher, referral_storage: IReferralStorageDispatcher, position_key: felt252, prices: MarketPrices, size_delta_usd: u128, ui_fee_receiver: ContractAddress, use_position_size_as_size_delta_usd: bool ) -> PositionInfo;
Implement the get_account_orders function in the Reader contract.
get_account_orders
fn get_account_orders( data_store: IDataStoreDispatcher, account: ContractAddress, start: u128, end: u128 ) -> Array<Order>;
Implement the get_markets function in the Reader contract.
get_markets
fn get_markets(data_store: IDataStoreDispatcher, start: u128, end: u128) -> Array<Market>;
Implement the get_market_info_list function in the Reader contract.
get_market_info_list
fn get_market_info_list( data_store: IDataStoreDispatcher, market_price_list: Array<MarketPrices>, start: u128, end: u128 ) -> Array<MarketInfo>;
Implement the get_market_info function in the Reader contract.
get_market_info
fn get_market_info( data_store: IDataStoreDispatcher, prices: MarketPrices, market_key: ContractAddress ) -> MarketInfo;
Implement the get_market_token_price function in the Reader contract.
get_market_token_price
fn get_market_token_price( data_store: IDataStoreDispatcher, market: Market, index_token_price: Price, long_token_price: Price, short_token_price: Price, pnl_factor_type: felt252, maximize: bool ) -> (i128, MarketPoolValueInfo);
Implement the get_net_pnl function in the Reader contract.
get_net_pnl
fn get_net_pnl( data_store: IDataStoreDispatcher, market: Market, index_token_price: Price, maximize: bool ) -> u128;
Implement the get_pnl function in the Reader contract.
get_pnl
fn get_pnl( data_store: IDataStoreDispatcher, market: Market, index_token_price: Price, is_long: bool, maximize: bool ) -> u128;
Implement the get_open_interest_with_pnl function in the Reader contract.
get_open_interest_with_pnl
fn get_open_interest_with_pnl( data_store: IDataStoreDispatcher, market: Market, index_token_price: Price, is_long: bool, maximize: bool ) -> i128
Implement the get_pnl_to_pool_factor function in the Reader contract.
get_pnl_to_pool_factor
fn get_pnl_to_pool_factor( data_store: IDataStoreDispatcher, market_address: ContractAddress, prices: MarketPrices, is_long: bool, maximize: bool ) -> i128
Implement the get_swap_amount_out function in the Reader contract.
get_swap_amount_out
fn get_swap_amount_out( data_store: IDataStoreDispatcher, market: Market, prices: MarketPrices, token_in: ContractAddress, amount_in: u128, ui_fee_receiver: ContractAddress ) -> (u128, u128, SwapFees)
Implement the get_virtual_inventory function in the Reader contract.
get_virtual_inventory
fn get_virtual_inventory(data_store: IDataStoreDispatcher, market: Market) -> VirtualInventory;
Implement the get_execution_price function in the Reader contract.
get_execution_price
fn get_execution_price( data_store: IDataStoreDispatcher, market_key: ContractAddress, index_token_price: Price, position_size_in_usd: u128, position_size_in_token: u128, size_delta_usd: u128, // TODO replace with i128 when it derives Store is_long: bool ) -> ExecutionPriceResult
Implement the get_swap_price_impact function in the Reader contract.
get_swap_price_impact
fn get_swap_price_impact( data_store: IDataStoreDispatcher, market_key: ContractAddress, token_in: ContractAddress, token_out: ContractAddress, amount_in: u128, token_in_price: Price, token_out_price: Price ) -> (i128, i128)
Implement the get_adl_state function in the Reader contract.
get_adl_state
fn get_adl_state( data_store: IDataStoreDispatcher, market: ContractAddress, is_long: bool, prices: MarketPrices ) -> (u128, bool, i128, u128);
I can take this
Assigned !
Description
Implement the
get_market
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_market_by_salt
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_deposit
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_withdrawl
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_position
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_order
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_position_pnl_usd
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_account_positions
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_account_position_info_list
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_position_info
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_account_orders
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_markets
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_market_info_list
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_market_info
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_market_token_price
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_net_pnl
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_pnl
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_open_interest_with_pnl
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_pnl_to_pool_factor
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_swap_amount_out
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_virtual_inventory
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_execution_price
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_swap_price_impact
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Implement the
get_adl_state
function in theReader
contract.File:
src/reader/reader.cairo
.Function signature:
Acceptance criteria
Resources