Vagabonds-Labs / cofiblocks

Welcome to Cofiblocks marketplace: A Starknet web3 platform to innovate Costa Rica coffee industry. Cofiblocks connects small coffee farmers directly with coffee lovers, cutting out unnecessary intermediaries.
https://www.cofiblocks.com/
3 stars 9 forks source link

Cartridge Controller Proof of Concept (POC) #5

Open brolag opened 1 week ago

brolag commented 1 week ago

Create a proof of concept using the Cartridge controller to test its functionality and integration with the platform.

bitfalt commented 6 days ago

hii, i'm interested in tackling this issue.

onlydustapp[bot] commented 6 days ago

Hey @bitfalt! Thanks for showing interest. We've created an application for you to contribute to Cofiblocks. Go check it out on OnlyDust!

brolag commented 6 days ago

@bitfalt asigning this to you.

bitfalt commented 6 days ago

@brolag you told me, as a bonus, to see how a Paymaster might be implemented in the Cartridge Controller, so far I've seen the following:

PaymasterOptions receives an URL (which I assume is the URL of the paymaster). https://github.com/cartridge-gg/controller/blob/main/packages/controller/src/types.ts#L168-L178

Then the PaymasterOptions are passed as the type for paymaster in ControllerOptions. https://github.com/cartridge-gg/controller/blob/main/packages/controller/src/types.ts#L140-L163

This paymaster is used to execute all the functions when doing a transaction with the Controller. https://github.com/cartridge-gg/controller/blob/main/packages/controller/src/device.ts#L91-L133

Some research info: I saw that AVNU has a paymaster for Starknet https://doc.avnu.fi/avnu-swap/products/paymaster, however it is in beta and right now it seems that it doesn't support Gasless Transactions which is what we're looking for. Finding an existing paymaster for gasless transactions in Starknet requires more research to find an existing Paymaster or how other dApps are implementing gasless transactions. https://starknet.id/ seems like a good starting point to research since in their /gift page they pay for the gas fees and the minting process.

bitfalt commented 3 days ago

This issue is now blocked since Cartridge doesn't support signing messages (EIP-712). It is on their roadmap, but hasn't been released yet once it is released the PoC will be implemented.