Skip to content

Instantly share code, notes, and snippets.

View Divide-By-0's full-sized avatar
💭
Working on zk email and open education. Reach out!

Yush G Divide-By-0

💭
Working on zk email and open education. Reach out!
View GitHub Profile
import PromiseQueue from 'https://cdn.skypack.dev/p-queue';
import Serde from 'https://cdn.skypack.dev/@darkforest_eth/serde';
import { CONTRACT_PRECISION } from 'https://cdn.skypack.dev/@darkforest_eth/constants';
let moveSnarkQueue;
if (window.moveSnarkQueue === undefined) {
moveSnarkQueue = new PromiseQueue({ concurrency: 1 });
moveSnarkQueue.on('add', () => {
console.log('Adding to task to the MoveSnark Queue. Size:', moveSnarkQueue.size);
});