Skip to content

Commit

Permalink
fix: fix conversion and leftover only
Browse files Browse the repository at this point in the history
  • Loading branch information
MirandaWood committed Feb 21, 2025
1 parent aa4c30f commit f1d9bc4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('e2e_deploy_contract contract class registration', () => {
});

describe('registering a contract class', () => {
it.only('optionally emits public bytecode', async () => {
it('optionally emits public bytecode', async () => {
const registrationTxReceipt = await registerContractClass(wallet, TestContract.artifact, true).then(c =>
c.send().wait(),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ import type {
BlockRootRollupData as BlockRootRollupDataNoir,
BlockRootRollupInputs as BlockRootRollupInputsNoir,
ConstantRollupData as ConstantRollupDataNoir,
ContractClassLog as ContractClassLogNoir,
EmptyBlockRootRollupInputs as EmptyBlockRootRollupInputsNoir,
FeeRecipient as FeeRecipientNoir,
FixedLengthArray,
Log as LogNoir,
MergeRollupInputs as MergeRollupInputsNoir,
Field as NoirField,
ParityPublicInputs as ParityPublicInputsNoir,
Expand Down Expand Up @@ -308,12 +308,15 @@ export function mapBlockBlobPublicInputsFromNoir(
* @param log - The ts contract class log.
* @returns The noir contract class log.
*/
export function mapContractClassLogToNoir(log: ContractClassLog): LogNoir<typeof CONTRACT_CLASS_LOG_SIZE_IN_FIELDS> {
export function mapContractClassLogToNoir(log: ContractClassLog): ContractClassLogNoir {
return {
// @ts-expect-error - below line gives error 'Type instantiation is excessively deep and possibly infinite. ts(2589)'
fields: Array.from({ length: CONTRACT_CLASS_LOG_SIZE_IN_FIELDS }, (_, idx) =>
mapFieldToNoir(log.fields[idx]),
) as Tuple<string, typeof CONTRACT_CLASS_LOG_SIZE_IN_FIELDS>,
log: {
// @ts-expect-error - below line gives error 'Type instantiation is excessively deep and possibly infinite. ts(2589)'
fields: Array.from({ length: CONTRACT_CLASS_LOG_SIZE_IN_FIELDS }, (_, idx) =>
mapFieldToNoir(log.fields[idx]),
) as Tuple<string, typeof CONTRACT_CLASS_LOG_SIZE_IN_FIELDS>,
},
contract_address: mapAztecAddressToNoir(log.contractAddress),
};
}

Expand Down

0 comments on commit f1d9bc4

Please sign in to comment.