Skip to content

Commit

Permalink
removed no longer necessary hack
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Feb 1, 2024
1 parent 554d316 commit 15c0009
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
16 changes: 4 additions & 12 deletions yarn-project/circuits.js/src/structs/tx_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
import { FieldsOf } from '@aztec/foundation/types';

import { PublicKey } from '../index.js';
import { AztecAddress, EthAddress, Fr, Point } from './index.js';
import { EthAddress, Fr, Point } from './index.js';

/**
* Contract deployment data in a TxContext
* Not to be confused with NewContractData.
*/
export class ContractDeploymentData {
/** Ethereum address of the portal contract on L1. */
public portalContractAddress: EthAddress;

constructor(
/** Public key of the contract. */
public publicKey: PublicKey,
Expand All @@ -21,14 +18,9 @@ export class ContractDeploymentData {
public contractClassId: Fr,
/** Contract address salt (used when deriving a contract address). */
public contractAddressSalt: Fr,
/**
* Ethereum address of the portal contract on L1.
* TODO(AD): union type kludge due to cbind compiler having special needs
*/
portalContractAddress: EthAddress | AztecAddress,
) {
this.portalContractAddress = EthAddress.fromField(portalContractAddress.toField());
}
/** Ethereum address of the portal contract on L1. */
public portalContractAddress: EthAddress,
) {}

toBuffer() {
return serializeToBuffer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('Noir<>Circuits.js type conversion test suite', () => {
new Fr(29n),
new Fr(30n),
new Fr(31n),
AztecAddress.random(),
EthAddress.random(),
);

it('should map contract deployment data', () => {
Expand Down

0 comments on commit 15c0009

Please sign in to comment.