dojoengine / dojo

Dojo is a toolchain for building provable games and applications
https://dojoengine.org
Apache License 2.0
418 stars 172 forks source link

Add support for paying fee using STRK #2405

Closed dkatzan closed 2 weeks ago

dkatzan commented 1 month ago

Starknet have recently released transactions v3, where fees are paid with STRK instead of ETH currently when starting katana, it is setting up the fee paying token as ETH with the hardcoded address of ETH on mainnet 0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 and it also funds the funded addresses with that token

it would be nice to add a config flag to start katana with STRK instead i.e the fee paying token should be at address 0x04718f5a0Fc34cC1AF16A1cdee98fFB20C31f5cD61D6Ab07201858f4287c938D instead and it wil have the relevnat name and symbol of STRK instead of ETH

prehaps an option flag that can accept one of 2 values --fee-paying-token STRK --fee-paying-token ETH

where --fee-paying-token ETH is the default to remain backward compatible thx

glihm commented 1 month ago

Ohio @dkatzan, thank you for this issue! This is something we had in the backlog which makes definitely sense at this moment.

Would you be interested in tackling it?

dehariayash commented 1 month ago

Can I take this?

glihm commented 1 month ago

@dehariayash do you see how to tackle that? The support for V3 transaction is already in the libraries, it's a matter of adjusting this and see how this could be configured by the user.