MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / getCheckpoints

Function getCheckpoints

CLI/commands/dividends_manager.js:662–674  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

660}
661
662async function getCheckpoints() {
663 let result = [];
664
665 let checkPointsTimestamps = await securityToken.methods.getCheckpointTimes().call();
666 for (let index = 0; index < checkPointsTimestamps.length; index++) {
667 let checkpoint = {};
668 checkpoint.id = index + 1;
669 checkpoint.timestamp = moment.unix(checkPointsTimestamps[index]).format('MMMM Do YYYY, HH:mm:ss');
670 result.push(checkpoint);
671 }
672
673 return result.sort((a, b) => a.id - b.id);
674}
675
676function isValidDividend(dividend) {
677 let now = Math.floor(Date.now() / 1000);

Callers 1

selectCheckpointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected