hats-finance / hats-contracts

MIT License
38 stars 47 forks source link

Saner naming conventions in the contract [small refactor] #117

Closed jellegerbrandy closed 2 years ago

jellegerbrandy commented 2 years ago

Some proposals for making the code more readable and the API more friendly:

ABI changes

Changes related to ERC4246

Cf. #124

internal changes

Other changes

lirona commented 2 years ago

also maybe rename WithdrawRequests to be a bit more informative? it means the time when WithdrawRequest pending period had ended in case the last action was WithdrawRequests, or 0 if last action was deposit or withdraw. so maybe WithdrawRequestPendingFinished ?

lirona commented 2 years ago

also decide on pool vs. vault

lirona commented 2 years ago

@jellegerbrandy what about approver --> committee ?

lirona commented 2 years ago

_startBlock -> _startRewardingBlock ?

jellegerbrandy commented 2 years ago

Sorry just seeing this now :)

jellegerbrandy commented 2 years ago

also lets remove the Log from PendingApprovalLog, PendingRewardsLevelsLog and PendingRewardsLevelsLog

lirona commented 2 years ago
jellegerbrandy commented 2 years ago

ok, all this seems good :)

lirona commented 2 years ago

great :) and what about PoolInfo.balance --> PoolInfo.totalSupply ?

jellegerbrandy commented 2 years ago

So the erc4626 standard which is my bible now calls the shares "shares" and the underlying token "assets". So I'd vote for totalAssets, perhaps. Supply is not so appropriate, I think - these assets are not really "available", they are actually locked up 2 times a day :)

lirona commented 2 years ago

Cool. I have to dig deep into this as well. also thought rewardsLevels --> bugSeverityLevels because we use the term severity for it. or could be just BountyLevels

lirona commented 2 years ago

_pid --> _vaultID

lirona commented 2 years ago

move committeeCheckIn from poolReward to poolInfo ?

lirona commented 2 years ago

all refactoring tasks in a to-do list: https://www.notion.so/refactoring-96b5eb494bb4423a810fe3abe3486a7b