Public
Edited
Mar 2, 2023
Insert cell
Insert cell
seriesData = {
const seriesList = [];

const seriesInitialized = await divider
.queryFilter(
divider.filters.SeriesInitialized(null, null, null, null, null, null)
)
.then((es) =>
es.map((e) => ({
...divider.interface.parseLog(e).args
}))
);

for (const {
pt: ptAddress,
target: _target,
adapter: _adapterAddress,
maturity
} of seriesInitialized) {
if (DEPRECATED_ADAPTERS.includes(_adapterAddress.toLowerCase())) continue;

const _pt = new ethers.Contract(
ptAddress,
["function symbol() external view returns (string)"],
provider
);
const pt_symbol = await _pt.symbol();

const { mscale } = await divider.series(_adapterAddress, maturity);

const settled = !mscale.eq(0);

seriesList.push({ pt_symbol, pt_address: ptAddress, maturity, settled });
}

return Inputs.table(seriesList, {
sort: "maturity",
reverse: true,
width: {
pt_symbol: 200,
pt_address: 400
}
});
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more