Skip to content

Commit

Permalink
using getFields more
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Feb 1, 2024
1 parent 3b7ef0d commit 1555fc0
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions yarn-project/circuits.js/src/structs/call_context.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AztecAddress } from '@aztec/foundation/aztec-address';
import { EthAddress } from '@aztec/foundation/eth-address';
import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
import { BufferReader, FieldReader, serializeToBuffer, serializeToFieldArray } from '@aztec/foundation/serialize';
import { FieldsOf } from '@aztec/foundation/types';

import { Fr, FunctionSelector } from './index.js';
Expand Down Expand Up @@ -108,16 +108,7 @@ export class CallContext {
}

toFields(): Fr[] {
return [
this.msgSender.toField(),
this.storageContractAddress.toField(),
this.portalContractAddress.toField(),
this.functionSelector.toField(),
new Fr(this.isDelegateCall),
new Fr(this.isStaticCall),
new Fr(this.isContractDeployment),
new Fr(this.startSideEffectCounter),
];
return serializeToFieldArray(...CallContext.getFields(this));
}

/**
Expand Down

0 comments on commit 1555fc0

Please sign in to comment.