l1-lottery-contracts
Version:
This repo contains smart contracts and related scripts for ZkNoid L1 Lottery proposed [here](https://forums.minaprotocol.com/t/zknoid-l1-lottery/6269)
22 lines • 575 B
JavaScript
/// Best fucking naming
export class RandomManagerManager {
constructor(contract) {
this.contract = contract;
}
addCommit(commit) {
if (this.commit) {
throw Error(`You have already committed to round}`);
}
this.commit = commit;
}
toJSON() {
const json = {
commit: {
salt: this.commit?.salt.toString(),
value: this.commit?.value.toString(),
},
};
return JSON.stringify(json);
}
}
//# sourceMappingURL=RandomManagerManager.js.map