Skip to content

Commit

Permalink
fix: browser stuff 💀
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Apr 24, 2024
1 parent 183a54c commit 6078bb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion yarn-project/aztec.js/src/api/abi.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { ContractArtifact, FunctionArtifact, FunctionSelector } from '@aztec/foundation/abi';
export { loadContractArtifact } from '@aztec/types/abi';
export { loadContractArtifact, contractArtifactToBuffer, contractArtifactFromBuffer } from '@aztec/types/abi';
export { NoirCompiledContract } from '@aztec/types/noir';
6 changes: 3 additions & 3 deletions yarn-project/end-to-end/src/shared/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ export const browserTestSuite = (
INITIAL_TEST_SIGNING_KEYS,
INITIAL_TEST_ACCOUNT_SALTS,
Buffer,
contractArtifactFromBuffer,
} = window.AztecJs;
// We serialize the artifact since buffers (used for bytecode) do not cross well from one realm to another
const TokenContractArtifact = JSON.parse(
Buffer.from(serializedTokenContractArtifact, 'base64').toString('utf-8'),
(key, value) => (key === 'bytecode' && typeof value === 'string' ? Buffer.from(value, 'base64') : value),
const TokenContractArtifact = contractArtifactFromBuffer(
Buffer.from(serializedTokenContractArtifact, 'base64'),
);
const pxe = createPXEClient(rpcUrl!);

Expand Down

0 comments on commit 6078bb0

Please sign in to comment.