Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove public var transaction: CodableTransaction uses #729

Open
JeneaVranceanu opened this issue Jan 14, 2023 · 0 comments
Open

Remove public var transaction: CodableTransaction uses #729

JeneaVranceanu opened this issue Jan 14, 2023 · 0 comments
Labels
4.0 bug Something isn't working

Comments

@JeneaVranceanu
Copy link
Collaborator

What happened?

The use of public var transaction: CodableTransaction in ERCs and Web3.Contract only leads to side-effects. CodableTransaction must be created when we call a function and disposed of immediately when we are done with that particular call. CodableTransaction must be kept local as much as possible, at least when it comes to ERCs implementations and Web3.Contract. Keeping CodableTransaction that is reused across the lifespan of a Web3.Contract object will lead to side-effects eventually.

What are the steps to reproduce?

What is the expected behavior?

Remove public var transaction: CodableTransaction from the following classes:

Screenshot 2023-01-14 at 18 21 39

What is the error thrown?

What's the stack trace said?

OS version

Library version

https://github.com/web3swift-team/web3swift/tree/5063ca5067700f2826e7a19ae29bedce6b74bcc5

@JeneaVranceanu JeneaVranceanu added bug Something isn't working 4.0 labels Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant