Closed Rubilmax closed 1 year ago
Where would that package be used ? Looking at your implementation I understand that it looks very similar to what we implemented in solidity, but I feel like the use cases will be different (simply because of the language it is implemented in). Maybe later they will even diverge even more because of this. So maybe ts
to distinguish the two implementations, or even put it in another repository
That package would be used in any TS or js app integrating Morpho or event Compound/Aave
Ok so the purpose is to ease integration by providing the same math functions in js. It makes sense to have them in the same repository then, and I vote for ts
I vote for ts
or package
. Not src
. Do we know if it will be useful or not?
Already used in https://github.com/morpho-dao/morpho-v1/pull/1301 and morpho-js. Could also ease work of integrators
Because 90% of the morpho-utils repo is independent of ethers
, I think that we have to create another repo for a peer dependency of ethers
. So you have to say that morpho-utils is a repo extending ethers behavior where the majority of use cases do not implicate ethers
.
For me is the same thing as if you are trying to create a plugin for babel & one for jest in the same repo. Ok, they are related to maths but totally independent in their implementation.
I'm not close to your solution and it can be a good one but I think that we can debate about that.
The package was published at ethers-utils
Below is a sample PR showing the code to this issue
The goal is to publish an npm package to avoid having to duplicate maths across codebases
Open questions:
ts
folder,package
, orsrc
(and we thus move contracts tocontracts
)?