Writing options
address eth_usd_feed = address(0x987...);
uint volumeBase = 1e18;
uint strikePrice = 1300e18;
uint maturity = now + 30 days;
uint collateral = exchange.calcCollateral(
eth_usd_feed,
10 * volumeBase,
OptionsExchange.OptionType.CALL,
strikePrice,
maturity
);address holder = 0xDEF...;
address tkAddr = exchange.writeOptions(
eth_usd_feed,
10 * volumeBase,
OptionsExchange.OptionType.CALL,
strikePrice,
maturity,
holder
);Last updated