@hashgraph/sdk
Version:
3 lines (2 loc) • 608 B
JavaScript
import t from"./MirrorNodeContractQuery.js";import{encode as r}from"../encoding/hex.js";class e extends t{get JSONPayload(){if(null==this.callData)throw new Error("Call data is required.");return{data:r(this.callData),from:this.senderEvmAddress,to:this.contractEvmAddress,estimate:!0,gasPrice:this.gasPrice?.toString(),gas:this.gasLimit?.toString(),blockNumber:this.blockNumber?.toString(),value:this.value?.toString()}}async execute(t){const r=await this.performMirrorNodeRequest(t,this.JSONPayload);return Number(r.result)}}export{e as default};
//# sourceMappingURL=MirrorNodeContractEstimateQuery.js.map