-
Notifications
You must be signed in to change notification settings - Fork 16
Support RPC 0.8.1 #220
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
Support RPC 0.8.1 #220
Conversation
Sources/Starknet/Data/StorageProof/NodeHashToNodeMappingItem.swift
Outdated
Show resolved
Hide resolved
Sources/Starknet/Data/StorageProof/NodeHashToNodeMappingItem.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Maksim Zdobnikau <[email protected]>
| func createAccount( | ||
| name: String, | ||
| classHash: Felt = DevnetClientConstants.accountContractClassHash, | ||
| salt: Felt? = .zero | ||
| ) async throws -> CreateAccountResult { | ||
| try await createAccount( | ||
| name: name, | ||
| classHash: classHash, | ||
| salt: salt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: Can be removed as it was redundant
Sources/Starknet/Providers/StarknetProvider/JsonRpcParams.swift
Outdated
Show resolved
Hide resolved
Sources/Starknet/Providers/StarknetProvider/JsonRpcParams.swift
Outdated
Show resolved
Hide resolved
Sources/Starknet/Data/StorageProof/NodeHashToNodeMappingItem.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: I refactored these tests (similar as in JVM), there's not need to test multiplication in the same way multiple times. Should make more sense now.
Sources/Starknet/Data/StorageProof/NodeHashToNodeMappingItem.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Describe your changes
Add support for RPC 0.8.1
starknet_getStorageProofStarknetGetStorageProofResponse,StarknetGlobalRoots,StarknetContractsProof,StarknetContractLeafData,StarknetNodeHashToNodeMappingItem,StarknetBinaryNode,StarknetEdgeNode,StarknetContractsStorageKeystructsgetStorageProofmethod inStarknetRequeststarknet_getMessagesStatusStarknetMessageStatusstructgetMessagesStatusmethod inStarknetRequestStarknetAccountProtocol:signDeployAccountV3has nowresourceBoundsparam instead ofl1ResourceBoundsStarknetInvokeParamsV3,StarknetDeployAccountParamsV3,StarknetOptionalInvokeParamsV3:l1ResourceBoundsparam toresourceBoundsin constructorsStarknetFeeEstimate:gasConsumedtol1GasConsumedgasPricetol1GasPricedataGasPricetol1DataGasPricedataGasConsumedtol1DataGasConsumedl2GasConsumed,l2GasPricefieldsStarknetResourcesprotocol to have onlyl1Gasandl2GasfieldsStarknetExecutionResourcesfieldsStarknetDataAvailabilityandStarknetComputationResourcesStarknetInnerCallExecutionResourcesl1GasinStarknetResourceBoundsMappingcomputationResourcestoexecutionResourcesinStarknetFunctionInvocationand change its type toStarknetInnerCallExecutionResourcesinstead ofStarknetComputationResourcesfailureReasontoStarknetGetTransactionStatusResponseisRevertedtoStarknetFunctionInvocationLinked issues
Closes #219
Breaking changes
resourceBoundsinstead ofl1ResourceBoundsparamStarknetComputationResourceshas been removed;StarknetExecutionResourcesandStarknetFeeEstimatehave been updatedStarknetFeeEstimategas values are now of typeUInt64AsHex(for amounts) andUInt128AsHex(for prices)