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

Function readFile

CLI/commands/TickerRollForward.js:60–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58}
59
60async function readFile() {
61 var stream = fs.createReadStream(`${__dirname}/../data/ticker_data.csv`);
62
63 var csvStream = csv()
64 .on("data", function (data) {
65 ticker_data.push(new Ticker(data[0], data[1], data[2], data[3]));
66 })
67 .on("end", async function () {
68 await registerTickers();
69 });
70 stream.pipe(csvStream);
71}
72
73async function registerTickers() {
74 // Poly approval for registration fees

Callers 1

startScriptFunction · 0.85

Calls 1

registerTickersFunction · 0.85

Tested by

no test coverage detected