elixir-omg
elixir-omg copied to clipboard
Standardize variable namings with plasma-contract
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
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 |
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.
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.