Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for paying fee using STRK #2405

Closed
dkatzan opened this issue Sep 10, 2024 · 3 comments · Fixed by #2536
Closed

Add support for paying fee using STRK #2405

dkatzan opened this issue Sep 10, 2024 · 3 comments · Fixed by #2536
Labels
katana This issue is related to Katana

Comments

@dkatzan
Copy link

dkatzan commented Sep 10, 2024

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
Copy link
Collaborator

glihm commented Sep 12, 2024

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?

@glihm glihm added the katana This issue is related to Katana label Sep 12, 2024
@dehariayash
Copy link

Can I take this?

@glihm
Copy link
Collaborator

glihm commented Sep 19, 2024

@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.

kariy added a commit that referenced this issue Oct 14, 2024
ref #2498 #2405 

- update the default predeployed account class implementation to OZ `0.17.0` account [preset](https://github.com/OpenZeppelin/cairo-contracts/blob/v0.17.0/packages/presets/src/account.cairo)
- rename class constants

is it required to change the account implementation because the version we're using doesn't support transaction version > 1 as seen below:

https://github.com/OpenZeppelin/cairo-contracts/blob/6ab91b5cf57d6a7d02f2d5c5abfc7b5712bc8e47/src/account/account.cairo#L75C1-L77C14

technically v3 support is later added in OZ `0.8.1`. so going all the way to `0.17.0` may seem exaggerated, but `0.8.1` is ~8 months old now so better to just use the latest compatible version. tbh i dont exactly know how different `0.17.0` is compared to `0.8.1`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
katana This issue is related to Katana
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants