swarm icon indicating copy to clipboard operation
swarm copied to clipboard

Better naming for types, variables and packages in swap

Open ralph-pichler opened this issue 5 years ago • 3 comments

Many types, variables and packages in the swap codebase have names that are not very telling about what they represent.

For example references to the chequebook contract are simply often called contract which can be confusing once the system interacts with multiple contract types. Worse we're usually using contract as an alias for the github.com/ethersphere/swarm/contracts/swap import, sometimes even in the same files and functions where we use contract as a variable. The interface for chequebook contract abstractions is called Contract. Together all of this leads to code like var contract contract.Contract.

These names are mostly remnants from very early versions of Swap and should be changed to something more meaningful.

ralph-pichler avatar Sep 26 '19 17:09 ralph-pichler

Includes https://github.com/ethersphere/swarm/issues/1877

Eknir avatar Oct 22 '19 09:10 Eknir

@santicomp2014 and I will meet this week or the beginning of next week, going over the codebase together and making a proposal. We will present the proposal to you guys for review and afterward do the implementation.

Eknir avatar Feb 06 '20 11:02 Eknir

This should be changed to milestone and tackled in separate issues per few files. @Eknir

vojtechsimetka avatar Mar 03 '20 14:03 vojtechsimetka