You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a mess in terms of the base API we expose to users. This is epitomized in:
publicasyncestimateGas(opts?: Omit<SendMethodOptions,'estimateGas'|'skipPublicSimulation'>,): Promise<Pick<GasSettings,'gasLimits'|'teardownGasLimits'>>{// REFACTOR: both `this.txRequest = undefined` below are horrible, we should not be caching stuff that doesn't need to be.// This also hints at a weird interface for create/request/estimate/send etc.// Ensure we don't accidentally use a version of tx request that has estimateGas set to true, leading to an infinite loop.
this.txRequest=undefined;consttxRequest=awaitthis.create({ ...opts,estimateGas: false});// Ensure we don't accidentally cache a version of tx request that has estimateGas forcefully set to false.this.txRequest=undefined;constsimulationResult=awaitthis.wallet.simulateTx(txRequest,true);const{totalGas: gasLimits,teardownGas: teardownGasLimits}=getGasLimits(simulationResult,(opts?.fee?.gasSettings??GasSettings.default()).teardownGasLimits,);return{ gasLimits, teardownGasLimits };}
We need to clean this up so developers have a much simpler interface when performing basic interactions like:
We have a mess in terms of the base API we expose to users. This is epitomized in:
We need to clean this up so developers have a much simpler interface when performing basic interactions like:
Candidate design in progress is here
The text was updated successfully, but these errors were encountered: