Skip to content

Remove public var transaction: CodableTransaction uses #729

Open
@JeneaVranceanu

Description

@JeneaVranceanu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    4.0bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions