satoru icon indicating copy to clipboard operation
satoru copied to clipboard

Feat: support dual interfaces for all external facing contracts

Open sparqet opened this issue 1 year ago • 4 comments

Description

External facing smart contracts should implement dual facing interfaces to allow better composability. It means that this contracts should support snake_case and CamelCase at the same time for external functions.

Example on open-zeppelin: https://github.com/OpenZeppelin/cairo-contracts/issues/596

sparqet avatar Sep 05 '23 12:09 sparqet

I assume this one will be for later right

dbejarano820 avatar Sep 05 '23 18:09 dbejarano820

why is this needed for a brand new protocol on Cairo 2 though?

delaaxe avatar Sep 05 '23 23:09 delaaxe

It's to facilitate integration of products that already exists for GMX on EVM such as https://twitter.com/Puppetcopy.

But I don't think it's high priority yet. Let's build a working app first :rocket:

zarboq avatar Sep 05 '23 23:09 zarboq

Imo it would be better to handle this on the sdk side. Applications like Puppetcopy would already need a starknet sdk. It can easily abstract this by converting camel case to snake case before constructing the txn

tarrencev avatar Sep 22 '23 12:09 tarrencev