@tokamak-zk-evm/synthesizer
Version:
Tokamak zk-EVM Synthesizer - Processes Ethereum transactions into wire maps for Tokamak zk-SNARK proof generation
40 lines • 1.4 kB
TypeScript
import { EVM } from '../evm.js';
import { PlacementInstances } from '../tokamak/types/synthesizer.js';
import { ExecResult } from '../types.js';
export declare class SynthesizerAdapter {
private evm;
constructor();
private isSupportedToken;
private isTON;
private getTokenConfig;
private isUnsupportedMethod;
get placementIndices(): {
storageIn: number;
return: number;
storageOut: number;
};
private createFreshEVM;
/**
* Parses and processes an ERC20 transaction, returning all necessary data structures in memory.
* @param {string} params.contractAddr - The ERC20 contract address
* @param {string} params.calldata - The transaction calldata
* @param {string} params.sender - The transaction sender address
* @returns {Promise<{
* evm: EVM,
* executionResult: ExecResult,
* permutation: Permutation,
* placementInstance: PlacementInstances
* }>} Returns EVM instance, execution result, permutation and placementInstance
*/
parseTransaction({ contractAddr, calldata, sender, }: {
contractAddr: string;
calldata: string;
sender: string;
}): Promise<{
evm: EVM;
executionResult: ExecResult;
permutation: any;
placementInstance: PlacementInstances;
}>;
}
//# sourceMappingURL=synthesizerAdapter.d.ts.map