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

autogeneration v0.3.0-rc1 #87

Open
notV4l opened this issue May 3, 2023 · 0 comments
Open

autogeneration v0.3.0-rc1 #87

notV4l opened this issue May 3, 2023 · 0 comments

Comments

@notV4l
Copy link

notV4l commented May 3, 2023

  • validate_all fails (starknet_write_api.json)
➜  starknet-specs git:(v0.3.0-rc1) ✗ yarn validate_all
yarn run v1.22.19
$ node validate.js api/starknet_api_openrpc.json && node validate.js api/starknet_write_api.json && node validate.js api/starknet_trace_api_openrpc.json
Ok!
Error validating OpenRPC Document against @open-rpc/meta-schema.
The errors found are as follows:
[
  {
    "keyword": "additionalProperties",
    "dataPath": ".components.errors['CLASS_HASH_NOT_FOUND']",
    "schemaPath": "#/additionalProperties",
    "params": {
      "additionalProperty": "$ref"
    },
    "message": "should NOT have additional properties"
  }
]
Ok!

  • generate typings for starknet_write_api fails
  • generate typings for starknet_trace_api_openrpc fails
➜  starknet-specs git:(v0.3.0-rc1) ✗ node ./node_modules/@open-rpc/typings/build/cli.js -d ./api/starknet_trace_api_openrpc.json --output-ts .
The json schema provided cannot be dereferenced. Received Error:
 Unable to parse reference inside of JSONSchema

error message: InvalidJsonPointerRefError
The provided RFC6901 JSON Pointer is invalid: #/components/schemas/ADDRESS

addition info:
Error evaluating JSON Pointer: no attribute ADDRESS on [object Object]
schema in question: {"oneOf":[{"name":"INVOKE_TXN_TRACE","type":"object","description":"the execution trace of an invoke transaction","properties":{"validate_invocation":{"$ref":"#/components/schemas/FUNCTION_INVOCATION"},"execute_invocation":{"description":"the trace of the __execute__ call or constructor call, depending on the transaction type (none for declare transactions)","$ref":"#/components/schemas/FUNCTION_INVOCATION"},"fee_transfer_invocation":{"$ref":"#/components/schemas/FUNCTION_INVOCATION"}}},{"name":"DECLARE_TXN_TRACE","type":"object","description":"the execution trace of a declare transaction","properties":{"validate_invocation":{"$ref":"#/components/schemas/FUNCTION_INVOCATION"},"fee_transfer_invocation":{"$ref":"#/components/schemas/FUNCTION_INVOCATION"}}},{"name":"DEPLOY_ACCOUNT_TXN_TRACE","type":"object","description":"the execution trace of a deploy account transaction","properties":{"validate_invocation":{"$ref":"#/components/schemas/FUNCTION_INVOCATION"},"constructor_invocation":{"description":"the trace of the __execute__ call or constructor call, depending on the transaction type (none for declare transactions)","$ref":"#/components/schemas/FUNCTION_INVOCATION"},"fee_transfer_invocation":{"$ref":"#/components/schemas/FUNCTION_INVOCATION"}}},{"name":"L1_HANDLER_TXN_TRACE","type":"object","description":"the execution trace of an L1 handler transaction","properties":{"function_invocation":{"description":"the trace of the __execute__ call or constructor call, depending on the transaction type (none for declare transactions)","$ref":"#/components/schemas/FUNCTION_INVOCATION"}}}],"components":{"schemas":{"TRANSACTION_TRACE":"[Circular]","SIMULATION_FLAG":{"type":"string","enum":["SKIP_VALIDATE","SKIP_EXECUTE"],"description":"Flags that indicate how to simulate a given transaction"},"NESTED_CALL":{"$ref":"#/components/schemas/FUNCTION_INVOCATION"},"FUNCTION_INVOCATION":{"allOf":[{"$ref":"#/components/schemas/FUNCTION_CALL"},{"type":"object","properties":{"caller_address":{"title":"Caller Address","description":"The address of the invoking contract. 0 for the root invocation","$ref":"#/components/schemas/FELT"},"code_address":{"title":"Code Address","description":"The address where the code for this contract is stored in the state","$ref":"#/components/schemas/FELT"},"entry_point_type":{"$ref":"#/components/schemas/ENTRY_POINT_TYPE"},"call_type":{"$ref":"#/components/schemas/CALL_TYPE"},"result":{"title":"Invocation Result","description":"The value returned from the function invocation","type":"array","items":{"$ref":"#/components/schemas/FELT"}},"calls":{"title":"Nested Calls","description":"The calls made by this invocation","type":"array","items":{"$ref":"#/components/schemas/NESTED_CALL"}},"events":{"title":"Invocation Events","description":"The events emitted in this invocation","type":"array","items":{"$ref":"#/components/schemas/EVENT"}},"messages":{"title":"L1 Messages","description":"The messages sent by this invocation to L1","type":"array","items":{"$ref":"#/components/schemas/MSG_TO_L1"}}}}]},"ENTRY_POINT_TYPE":{"type":"string","enum":["EXTERNAL","L1_HANDLER","CONSTRUCTOR"]},"CALL_TYPE":{"type":"string","enum":["LIBRARY_CALL","CALL"]},"FELT":{"$ref":"./api/starknet_api_openrpc.json#/components/schemas/FELT"},"FUNCTION_CALL":{"$ref":"./api/starknet_api_openrpc.json#/components/schemas/FUNCTION_CALL"},"EVENT":{"$ref":"./api/starknet_api_openrpc.json#/components/schemas/EVENT_CONTENT"},"MSG_TO_L1":{"$ref":"./api/starknet_api_openrpc.json#/components/schemas/MSG_TO_L1"},"BLOCK_HASH":{"$ref":"./api/starknet_api_openrpc.json#/components/schemas/BLOCK_HASH"},"BLOCK_ID":{"$ref":"./api/starknet_api_openrpc.json#/components/schemas/BLOCK_ID"},"BROADCASTED_TXN":{"$ref":"./api/starknet_api_openrpc.json#/components/schemas/BROADCASTED_TXN"},"FEE_ESTIMATE":{"$ref":"./api/starknet_api_openrpc.json#/components/schemas/FEE_ESTIMATE"}}}}
Please revise the validation errors above and try again.
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant