Skip to content

Commit

Permalink
Format example code
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWilliams2 authored and marcvelmer committed Apr 11, 2024
1 parent 646e74c commit bf28fda
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions examples/tutorial/src/census.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { PlainCensus } from '@vocdoni/sdk'
import { Wallet } from '@ethersproject/wallet'
import { PlainCensus } from '@vocdoni/sdk';
import { Wallet } from '@ethersproject/wallet';

export async function createCensus () {
const census = new PlainCensus()

const census = new PlainCensus();
// Create a list of random voters, register them to the census
let voters: Wallet[] = []
let voters: Wallet[] = [];
for (let i = 0; i < 5; i++) {
voters.push(Wallet.createRandom())
census.add(await voters[i].getAddress())
voters.push(Wallet.createRandom());
census.add(await voters[i].getAddress());
}

return { census, voters }
return { census, voters };
}

0 comments on commit bf28fda

Please sign in to comment.