swarm
swarm copied to clipboard
Better naming for types, variables and packages in swap
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.
Includes https://github.com/ethersphere/swarm/issues/1877
@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.
This should be changed to milestone and tackled in separate issues per few files. @Eknir