-
Notifications
You must be signed in to change notification settings - Fork 0
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
Starknet support #3
Comments
Open questions for working with Starknet:
|
Hey! Ohad from the StarkWare product team here. First, sorry for the long delay in getting back to you!
|
Hey @ob1337 thanks for answering the questions!
Alright, then this definitely seems like an over-optimization, we would just go with storing the data on-chain.
Is there a standard how to verify signature of the external account? I am looking for something like erc-1271 from the ethereum world. Also checking if there is any standard way to sign structured data, something like eip-712 in ethereum.
I think using multi-signature account just adds more complexity, because that would imply a separate transaction that's required to fund the multi-signature account in the first place, and then also have a timeout mechanism in case one of the parties don't sign. Btw, it seems like you should be able to get the nonce from the ExecutionInfo struct as TxInfo, just to make sure, does every wallet (due to account abstraction) use nonces (i.e. there is no nonce abstraction)?
Alright, makes sense, so for now we just go with external RPCs and re-evaluate in the future. |
|
Hey @ob1337 thanks you for the answers!
That's a nice improvement, can I already deploy a contract using sierra 2.10 on mainnet and then enjoy the discount as soon as it comes, or is sierra 2.10 not yet supported and I would have to redeploy the contracts when 0.13.4 goes live? Also I've run into some issues using scarb 2.10.0-rc0, specifically with openzeppelin libs:
Which is weird, because IMO ^2.9.1 should accept 2.10.0-rc.0 - maybe it's because of the leading "v"?
Alright, that works, found an openzeppelin lib for SNIP12, and implemented SNIP6 signature checking with is_valid_signature call.
Eventually I ended up just storing the already created escrows indefinitely (i.e. as used nonces), is there even any refund on starknet for clearing out storage? I also wanted to ask one more question, in regards to using |
Hey @ob1337, just bumping this and adding one more question, also I've already figured that I would need to wait for starknet 0.13.4 to be able to deploy Sierra 2.10 contracts, so you can disregard that question. I want to ask if it is possible to do a conditional compilation based on feature flags, such that some part of the code is skipped, or inserted, I've figured (based on snforge book) I can conditionally compile whole modules or functions, but it doesn't state anything about conditionally compiling blocks of code, such as single if statements - this works in rust with |
2.10.0 is the Cairo version, Sierra is 1.7.0 (each compiler/Scarb version is associated with a Sierra version).
I think RC versions are not considered greater than stable ones hence this is expected. The final 2.10.0 will be released in 1-2 weeks (it will be out before the testnet upgrade).
No
Will be possible from v0.13.4 (Feb/March for Testnet/Mainnet).
It's possible, see the gas example in the corelib, though TBH I'm not sure if it's the best way to do it. Sounds like 2 impls of some trait, one used for testing and the other in the actual contract, would be more fitting, but I don't really have enough context. |
Thank you for the info!
Did something similar here, got 2 functions with the same where one is used in with "release" feature another one with "test", not the cleanest, but works. It might actually make sense to put some examples for this into the docs, I think it is pretty common to have slightly different functionality with different feature flags. |
Why do we need this?
We want to support Starknet as part of our expansion to other chains.
Expected complexity
Very high
Comments
This will require:
Reusability
N/A
The text was updated successfully, but these errors were encountered: