Files
DefiLlama-yield-server/scripts/createUUID.js
slasher125 8d55fe9f93 Pg migration (#303)
* migration

* remove balancer pools from exclusion list

* bug fix serverless

* remove timestamp from median, update for tests

* update get distinct id controller

* update distinctID controller, remove dep

* move confirm into scripts

* testing url

* remove Pg suffix from lambda names

* change to existing api host

* add comments

* revert service name, bucketsg

* put pack fantom rpc

* update package.lock
2022-09-06 15:27:30 -07:00

22 lines
608 B
JavaScript

const fs = require('fs');
const crypto = require('crypto');
const data = JSON.parse(fs.readFileSync('./yield_snapshot_last.json'));
const uniquePools = new Set(data.map((p) => p.pool));
console.log('nb of unique pools: ', uniquePools.size);
const uuidMapping = {};
for (const pool of uniquePools) {
uuidMapping[pool] = crypto.randomUUID();
}
console.log(
'nb of unique pools in mapping: ',
new Set(Object.keys(uuidMapping)).size
);
console.log(
'nb of unique uuids in mapping: ',
new Set(Object.values(uuidMapping)).size
);
fs.writeFileSync('./created_uuids.json', JSON.stringify(uuidMapping));