difftreelog
refactor changed arch of bechmarks
in: master
added export to `csv` ops fees
6 files changed
tests/.gitignorediffbeforeafterboth1/node_modules/1/node_modules/2properties.csv2properties.csv33erc721.csv4erc20.csvtests/src/benchmarks/mintFee/benchmark.tsdiffbeforeafterbothno changes
tests/src/benchmarks/mintFee/common.tsdiffbeforeafterbothno changes
tests/src/benchmarks/mintFee/mintFee.tsdiffbeforeafterbothno changes
tests/src/benchmarks/mintFee/opsFee.tsdiffbeforeafterbothno changes
tests/src/benchmarks/mintFee/types.tsdiffbeforeafterboth8 }8 }9910}10}11export interface IFeeGasCsv extends IFeeGasVm {12 function: string,13}14export interface IFeeGasVm{15 ethFee?: number | bigint,16 ethGas?: number | bigint,17 substrate?: number,18 zeppelinFee?: number | bigint,19 zeppelinGas?: number | bigint20}11export interface IFunctionFee {21export interface IFunctionFee {12 [name: string]: IFeeGas22 [name: string]: IFeeGas13}23}24142515export abstract class FunctionFeeVM {26export abstract class FunctionFeeVM {16 [name: string]: {27 [name: string]: IFeeGasVm2829 static toCsv(model: FunctionFeeVM): IFeeGasCsv[]{17 ethFee?: number | bigint,30 const res: IFeeGasCsv[] = [];31 Object.keys(model).forEach(key => {32 res.push({33 function: key,34 ethFee: model[key].ethFee,18 ethGas?: number | bigint,35 ethGas: model[key].ethGas,19 substrate?: number,36 substrate: model[key].substrate,20 zeppelinFee?: number | bigint,37 zeppelinFee: model[key].zeppelinFee,21 zeppelinGas?: number | bigint38 zeppelinGas: model[key].zeppelinGas,39 });40 });41 return res;22 };42 }2324 static fromModel(model: IFunctionFee): FunctionFeeVM {43 static fromModel(model: IFunctionFee): FunctionFeeVM {25 const res: FunctionFeeVM = {};44 const res: FunctionFeeVM = {};