question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redesign of `CodableTransaction` gas resolver

See original GitHub issue

Within 3.0.0 all tx methods, properties etc were combined within CodableTransaction. This is quite rough decision and surely not the best one available.

Whilst there’s a room for improvement in many kinds, this issue focused on figuring out a good way to improve gas resolving related methods and properties.

So @janndriessen proposed to move resolver from within CodableTransaction object type to Web3Provider object, stating there it fits better.

This is good one, but to keep consistency within the lib we should to think as well about both tied to that resolvers parts of the library and the transaction sending pipeline itself.

Therefore I invite you folks to discuss the sending transaction as well as calling contract API pipeline design.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
janndriessencommented, Nov 1, 2022

@yaroslavyaroslav @JeneaVranceanu @mloit please see #645 for a first draft PR.

1reaction
janndriessencommented, Oct 26, 2022

Wouldn’t you just set the policy to manual and based on tx type the other policies would be ignored?

My point was to drop policies from within CodableTransaction totally. Like there’s only transaction gas properties left, but no Policies properties. But to keep automatic resolve features I suggest the way above, but it’s discussable for sure.

I like the idea. This would help CodableTransaction get clean and more simple (just a struct).

Checked again that only gasLimit and nonce policies actually use the transaction passed. So we could easily all do this in the resolver who already has the provider (as described in the outline above).

Read more comments on GitHub >

github_iconTop Results From Across the Web

File a complaint involving a gas, electric, or water company
Having a problem with your gas, electric, or investor-owned water company? ... water company, you should contact the company to try and resolve...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found