-
Notifications
You must be signed in to change notification settings - Fork 15
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 StarknetMerkleTree
and merkletree
support in StarknetTypedData
#167
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add `dataAvailability` to `StarknetExecutionResources`; Add `StarknetDataAvailability - Add `executionResources` to tx traces - Add `StarknetComputationResources` - Add `computationResources` to `StarknetFunctionInvocation` - Add `StarknetResources` protocol with common fields
- Prefund account with `5_000_000_000_000_000`->`5_000_000_000_000_000_000` - Change max fee in declare methods to `1_000_000_000_000_000`->`10_000_000_000_000_000`
- Add `dataGasConsumed`, `dataGasPrice` fields to `StarknetFeeEstimate` - Update `.toResourceBounds()` extension - Update overheads - Use new logic
… and `StarknetExecutionResources` - Adjust tests
- Add `StarknetTypedData.Domain`, `StarknetTypedData.Revision` - Change `domain` type: `[String: Element] -> Domain` - Update initializer - Add `getStructHash(typeName: String, data: Data)` - Add `getStructHash(domain: Domain)`
- Use correct escape chars for rev 1
- Rename test files `typed_data_[..].json`-> `typed_data_rev_0_[..].json` - Add `typed_data_rev_1_example.json` - Update `TypedDataTests` - Move old td cases to `CasesRev0` - Add `CasesRev1`
…otocol - Add `TypeDeclarationWrapper` - Change `types` type from `[String: [TypeDeclaration]]` to `[String: [TypeDeclarationWrapper]]`
- Make `encode(type: String)` internal
…n/starknet.swift into feat/159-snip-12
This was referenced Apr 3, 2024
Merged
This was referenced Apr 4, 2024
THenry14
approved these changes
Apr 5, 2024
DelevoXDG
changed the title
Add
Add Apr 8, 2024
MerkleTree
and merkletree
support in StarknetTypedData
StarknetMerkleTree
and merkletree
support in StarknetTypedData
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack
StarknetTypedData
revision 1 #166StarknetMerkleTree
andmerkletree
support inStarknetTypedData
#167StarknetTypedData
in line with SNIP-12 #170bool
,ClassHash
,ContractAddress
basic types inStarknetTypedData
#173Felt(fromSigned)
initializer; Supportu128
,i128
,timestamp
types inStarknetTypedData
#174StarknetByteArray
; Support revision 1string
inStarknetTypedData
#175enum
basic type inStartknetTypedData
#178StarknetTypedData
#182StarknetTypedData
#180StarknetTypedData
docs (SNIP-12) #181Describe your changes
Add
StarknetMerkleTree
and support formerkletree
basic type inStarknetTypedData
StarknetMerkleTree
StarknetHashMethod.hash()
for two elements;StarknetHashMethod
publicStraknetMerkleTree
StarknetTypedData
MerkleTreeType
,StandardType
; ConvertTypeDeclaration
to protocolTypeDeclarationWrapper
types
type from[String: [TypeDeclaration]]
to[String: [TypeDeclarationWrapper]]
Data/StarknetTypedData.swift
toData/TypedData/StarknetTypedData.swift
TypeDeclaration
related extensions toData/TypeDeclaration.swift
Linked issues
Closes
Breaking changes
StarknetTypedData.TypeDeclaration
is now a protocol; UseStarknetTypedData.StandardType
insteadStarknetTypedData.types
is now of type[String: [TypeDeclarationWrapper]]
instead of[String: [TypeDeclaration]]