Skip to content

Commit

Permalink
update to 0.65.2
Browse files Browse the repository at this point in the history
  • Loading branch information
critesjosh authored Dec 2, 2024
1 parent b25994b commit 64fb0cd
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 97 deletions.
2 changes: 1 addition & 1 deletion Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ authors = [ "" ]
compiler_version = ">=0.18.0"

[dependencies]
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "aztec-packages-v0.63.1", directory = "noir-projects/aztec-nr/aztec" }
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "aztec-packages-v0.65.2", directory = "noir-projects/aztec-nr/aztec" }
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"update": "aztec update --contract . && ./.github/scripts/update_contract.sh $(grep -oP 'tag\\s*=\\s*\"\\K[^\"]+' \"Nargo.toml\" | head -1) && yarn"
},
"dependencies": {
"@aztec/accounts": "0.63.1",
"@aztec/aztec.js": "0.63.1",
"@aztec/noir-contracts.js": "0.63.1",
"@aztec/accounts": "0.65.2",
"@aztec/aztec.js": "0.65.2",
"@aztec/noir-contracts.js": "0.65.2",
"@types/node": "^22.5.1"
},
"devDependencies": {
Expand Down
14 changes: 8 additions & 6 deletions src/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ describe("Voting", () => {
const contract = await EasyPrivateVotingContract.deploy(wallets[0], accounts[0].address).send().deployed();
await contract.methods.cast_vote(candidate).send().wait();

const secondVoteReceipt = await contract.methods.cast_vote(candidate).send().getReceipt();
expect(secondVoteReceipt).toEqual(
expect.objectContaining({
status: TxStatus.DROPPED,
}),
);
// We try voting again, but our TX is dropped due to trying to emit duplicate nullifiers
// first confirm that it fails simulation
await expect(contract.methods.cast_vote(candidate).send().wait()).rejects.toThrow(/Nullifier collision/);
// if we skip simulation, tx is dropped
await expect(
contract.methods.cast_vote(candidate).send({ skipPublicSimulation: true }).wait(),
).rejects.toThrow('Reason: Tx dropped by P2P node.');

}, 300_000)

});
Loading

0 comments on commit 64fb0cd

Please sign in to comment.