You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the following error occurs: UnknownCairoTypeError: type 'felt' is not defined.
Stack trace
in get_contract
contract = Contract(
^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/contract.py", line 558, in init
self._functions = self._make_functions(
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/contract.py", line 804, in _make_functions
repository[name] = ContractFunction(
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/contract.py", line 433, in init
function = contract_data.parsed_abi.functions.get(name)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/functools.py", line 1001, in get
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/contract.py", line 80, in parsed_abi
return AbiV1Parser(self.abi).parse()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/abi/v1/parser.py", line 88, in parse
functions={
^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/abi/v1/parser.py", line 89, in
name: self._parse_function(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/abi/v1/parser.py", line 173, in _parse_function
inputs=self._parse_members(function["inputs"], function["name"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/abi/v1/parser.py", line 191, in _parse_members
return OrderedDict(
^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/abi/v1/parser.py", line 192, in
(name, self.type_parser.parse_inline_type(param["type"]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/cairo/v1/type_parser.py", line 57, in parse_inline_type
raise UnknownCairoTypeError(parsed.name)
starknet_py.cairo.v1.type_parser.UnknownCairoTypeError: Type 'felt' is not defined. Please report this issue at https://github.com/software-mansion/starknet.py/issues
Steps to reproduce
SDK Version
.
Python version
3.11.3
What operating system are you using?
Mac
Is there an existing issue for this?
I have searched the existing issues and verified no issue exits for this problem.
The text was updated successfully, but these errors were encountered:
How was this issue actually solved ? I cannot find any PR linked to this issue.
I am trying to use Starknet pr v0.24 and am encountering this issue when initializing the Contract instance using the ABI json file
What happened
When creating a Contract instance with the ABI:
[
{
"name": "function_name",
"type": "function",
"inputs": [
{
"name": "input_name",
"type": "felt"
}
],
"outputs": []
}
]
the following error occurs: UnknownCairoTypeError: type 'felt' is not defined.
Stack trace
in get_contract
contract = Contract(
^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/contract.py", line 558, in init
self._functions = self._make_functions(
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/contract.py", line 804, in _make_functions
repository[name] = ContractFunction(
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/contract.py", line 433, in init
function = contract_data.parsed_abi.functions.get(name)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/functools.py", line 1001, in get
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/contract.py", line 80, in parsed_abi
return AbiV1Parser(self.abi).parse()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/abi/v1/parser.py", line 88, in parse
functions={
^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/abi/v1/parser.py", line 89, in
name: self._parse_function(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/abi/v1/parser.py", line 173, in _parse_function
inputs=self._parse_members(function["inputs"], function["name"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/abi/v1/parser.py", line 191, in _parse_members
return OrderedDict(
^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/abi/v1/parser.py", line 192, in
(name, self.type_parser.parse_inline_type(param["type"]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/starknet_py/cairo/v1/type_parser.py", line 57, in parse_inline_type
raise UnknownCairoTypeError(parsed.name)
starknet_py.cairo.v1.type_parser.UnknownCairoTypeError: Type 'felt' is not defined. Please report this issue at https://github.com/software-mansion/starknet.py/issues
Steps to reproduce
SDK Version
.
Python version
3.11.3
What operating system are you using?
Mac
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: