Skip to content

Commit

Permalink
txe implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
fcarreiro committed Sep 23, 2024
1 parent 40db92e commit 11f5fdf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions yarn-project/txe/src/oracle/txe_oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@ export class TXE implements TypedOracle {
return Promise.resolve(this.contractAddress);
}

getIsStaticCall() {
// Fixed false value copied from getPublicContextInputs.
return Promise.resolve(false);
}

getRandomField() {
return Fr.random();
}
Expand Down
5 changes: 5 additions & 0 deletions yarn-project/txe/src/txe_service/txe_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ export class TXEService {
return toForeignCallResult([toSingle(functionSelector.toField())]);
}

avmOpcodeIsStaticCall() {
const isStaticCall = (this.typedOracle as TXE).getIsStaticCall();
return toForeignCallResult([toSingle(isStaticCall.toField())]);
}

async avmOpcodeChainId() {
const chainId = await (this.typedOracle as TXE).getChainId();
return toForeignCallResult([toSingle(chainId)]);
Expand Down

0 comments on commit 11f5fdf

Please sign in to comment.