create-eth-app icon indicating copy to clipboard operation
create-eth-app copied to clipboard

DRY-ify contract ABIs and addresses

Open PaulRBerg opened this issue 5 years ago • 1 comments

For each new DeFi template, the repo grows twice as much as in size because the ABIs and the addresses are duplicated across the UI frameworks.

We should build a template of templates of templates (not kidding), whereby the contract ABIs and the address are pulled out each template source files, and the logic code maps each template to its corresponding contracts (to be specific, the logic code in template.ts).

PaulRBerg avatar Jul 17 '20 15:07 PaulRBerg

Or what if we piggybacked off money-legos?

Pro: our code base would shrink in size significantly.

Con: we'd have to drop support for testnets, or still hardcode those addresses, because money-legos provides contract data for mainnet only.

PaulRBerg avatar Nov 13 '20 13:11 PaulRBerg