-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
105 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 17 additions & 17 deletions
34
yarn-project/circuit-types/src/logs/l1_event_payload.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import { AztecAddress } from '@aztec/circuits.js'; | ||
import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto'; | ||
// import { AztecAddress } from '@aztec/circuits.js'; | ||
// import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto'; | ||
|
||
import { L1EventPayload } from './l1_event_payload.js'; | ||
// import { L1EventPayload } from './l1_event_payload.js'; | ||
|
||
describe('L1EventPayload', () => { | ||
it('can encode L1EventPayload to plaintext and back', () => { | ||
const app = AztecAddress.random(); | ||
const original = L1EventPayload.random(app); | ||
const maskedContractAddress = poseidon2HashWithSeparator([app, original.randomness], 0); | ||
// describe('L1EventPayload', () => { | ||
// it('can encode L1EventPayload to plaintext and back', () => { | ||
// const app = AztecAddress.random(); | ||
// const original = L1EventPayload.random(app); | ||
// const maskedContractAddress = poseidon2HashWithSeparator([app, original.randomness], 0); | ||
|
||
const payloadPlaintext = original.toIncomingBodyPlaintext(); | ||
const recovered = L1EventPayload.fromIncomingBodyPlaintextAndContractAddress( | ||
payloadPlaintext, | ||
app, | ||
maskedContractAddress, | ||
); | ||
// const payloadPlaintext = original.toIncomingBodyPlaintext(); | ||
// const recovered = L1EventPayload.fromIncomingBodyPlaintextAndContractAddress( | ||
// payloadPlaintext, | ||
// app, | ||
// maskedContractAddress, | ||
// ); | ||
|
||
expect(recovered).toEqual(original); | ||
}); | ||
}); | ||
// expect(recovered).toEqual(original); | ||
// }); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
yarn-project/circuit-types/src/logs/l1_note_payload.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { AztecAddress } from '@aztec/circuits.js'; | ||
// import { AztecAddress } from '@aztec/circuits.js'; | ||
|
||
import { L1NotePayload } from './l1_note_payload.js'; | ||
// import { L1NotePayload } from './l1_note_payload.js'; | ||
|
||
describe('L1NotePayload', () => { | ||
it('can encode L1NotePayload to plaintext and back', () => { | ||
const app = AztecAddress.random(); | ||
const original = L1NotePayload.random(app); | ||
const payloadPlaintext = original.toIncomingBodyPlaintext(); | ||
const recovered = L1NotePayload.fromIncomingBodyPlaintextAndContractAddress(payloadPlaintext, app); | ||
// describe('L1NotePayload', () => { | ||
// it('can encode L1NotePayload to plaintext and back', () => { | ||
// const app = AztecAddress.random(); | ||
// const original = L1NotePayload.random(app); | ||
// const payloadPlaintext = original.toIncomingBodyPlaintext(); | ||
// const recovered = L1NotePayload.fromIncomingBodyPlaintextAndContractAddress(payloadPlaintext, app); | ||
|
||
expect(recovered).toEqual(original); | ||
}); | ||
}); | ||
// expect(recovered).toEqual(original); | ||
// }); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters