elixir-omg icon indicating copy to clipboard operation
elixir-omg copied to clipboard

Standardize variable namings with plasma-contract

Open achiurizo opened this issue 4 years ago • 3 comments

We already match variable names closely with plasma-contracts so let's do it for the rest. For example:

elixir-omg plasma-contracts
owner output_guard
currency token
blknum (should be blk_num?) blkNum
txindex (should be tx_index?) txIndex
oindex (should be output_index?) outputIndex

For the latter 3, I've seen some usage where we've mixed between txindex and tx_index on elixir-omg: https://github.com/omisego/elixir-omg/blob/master/apps/omg/lib/omg/state/core.ex#L49 https://github.com/omisego/elixir-omg/blob/master/apps/omg/lib/omg/utxo.ex#L33

achiurizo avatar Dec 26 '19 18:12 achiurizo

When it comes to deposits, the emitted event is

elixir-omg plasma-contracts
owner depositor
currency token
blknum (should be blk_num?) blknum
txindex (should be tx_index?) txindex
oindex (should be output_index?) outputindex

InoMurko avatar Feb 10 '20 17:02 InoMurko

I'm onboard. Do we want to take this all the way down to the DB level (postgres)?

If yes, then DB migration is required.

If no, when we update the ecto models we'll need to up the variable to column name mapping in addition to updating the variable names.

jrhite avatar Feb 11 '20 04:02 jrhite

I'm onboard. Do we want to take this all the way down to the DB level (postgres)?

I'm :+1: for having it consistent with the DB level.

achiurizo avatar Feb 17 '20 22:02 achiurizo