-
Notifications
You must be signed in to change notification settings - Fork 798
feat: Implement SNIP29 #1377
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
base: develop
Are you sure you want to change the base?
feat: Implement SNIP29 #1377
Conversation
a8ebf8c
to
f34bfde
Compare
f34bfde
to
1575ea3
Compare
Seems very very early to propose a PR on this subject... |
Not very very early at all - we’re actively finalizing SNIP-29, with StarkWare involved and supportive. |
Agreed with @0xMentorNotAPseudo - Starknet v0.14 means that the topic of paymaster becomes more important than ever and starknet.js is a key player for ecosystem adoption. I'm all for making it happen! |
When I try
Is your PR up-to-date? |
We have updated this pull request to align with the latest SNIP-29 changes. Notes:
|
Is a non-SNIP-9 compatible account able to use SNIP-29 features? |
When testing
Seems that the AVNU backend is reporting an error message in HTML, not in JSON format. So, Starknet.js is not able to decode and throw a documented Error. |
No. accounts must be compatible with snip 9 |
Two Paymaster RPC URLs are provided in the constants. Both are valid, but currently only the Sepolia instance is live. |
The problem is not to reach an URL. I can ask to Sepolia URL, using const res = await account0.paymaster.isAvailable();
const supported = await account0.paymaster.getSupportedTokens(); It works. No problem. |
So, it should
|
@penovicp , |
I tried to test, this afternoon, in Testnet.
and when using
The content of my account : So, what should work, and what should not? |
We had an issue on the paymaster service. The bug has been fix. You can test again the paymaster in classic fee mode. Thanks |
Well, messages are different, but result is the same :
|
I just fixed the issue you had with ETH and STRK. |
I have enough SWAY & USDC in my 2 test accounts.
|
We had an issue on the sepolia price feed. It's now fixed. Thanks |
Do you have any feedback regarding the PR ? Does the implementation align with the starknet.js architecture and coding conventions ? |
@tabaktoni & @penovicp will answer on this subject. |
For now we can mege it as it is, than we will need to create separate PR referencing to this one to isolate implementation so that we have clean solution.
|
Hello,
Improvements
|
How to use |
I rebased this one to develop and will merge it after exporting types to types-js and re-importing it. |
You should solve problem of |
I tried to use SNIP-29 with an account that uses ETH signature (and is SNIP-9 compatible). const res2 = await accountEthOZ17.execute(
myCall,
{
paymaster: {
feeMode: { mode: "default", gasToken },
maxEstimatedFeeInGasToken: BigInt(builtUSDC.fee.suggested_max_fee_in_gas_token) * multiplyFees,
}
}
); Even with |
Hello, |
Nice. @0xlny Have you some answers about my questions above? (especially about the problem with ETH signature) Or maybe would you prefer to discuss in an other space? For info, I tried also to deploy an account, but I have an error |
I'll check now for account deployment About the issue with ETH signature we can discuss it on TG, probably requires different gas calculation like account with 2fa for exemple |
In Telegram at @lenny_0x ? |
Motivation and Resolution
This PR introduces a
Provider
that enables direct interaction with a Paymaster service and integrates it into theAccount
class to simplify its usage.The implementation follows the SNIP-29 specification:
📄 SNIP-29 on GitHub