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
Erreur lors de l'exécution de la transaction : Type 'felt252' is not defined. Please report this issue at https://github.com/software-mansion/starknet.py/issues
Traceback complet de l'erreur :
Traceback (most recent call last):
File "path/to/my/script.py", line 106, in main
contract = Contract(
^^^^^^^^^
File "path/to/starknet_py/contract.py", line 746, in init
self._functions = self._make_functions(
^^^^^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/contract.py", line 1075, in _make_functions
repository[name] = ContractFunction(
^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/contract.py", line 543, in init
function = contract_data.parsed_abi.functions.get(name)
^^^^^^^^^^^^^^^^^^^^^^^^
File "path/to/functools.py", line 995, in get
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/contract.py", line 74, in parsed_abi
return AbiParserV1(self.abi).parse()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/abi/v1/parser.py", line 89, in parse
name: self._parse_function(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/abi/v1/parser.py", line 173, in _parse_function
inputs=self._parse_members(function["inputs"], function["name"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/abi/v1/parser.py", line 191, in _parse_members
return OrderedDict(
^^^^^^^^^^^^
File "path/to/starknet_py/abi/v1/parser.py", line 192, in
(name, self.type_parser.parse_inline_type(param["type"]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path/to/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 'felt252' is not defined. Please report this issue at https://github.com/software-mansion/starknet.py/issues
Steps to reproduce
from starknet_py.contract import Contract
Assuming ABI data is loaded from a source, here represented as a dictionary
Hey @otatataata, thanks for report. Could you please provide full code sample? This way I will be able to reproduce the error. Also, v0.4.7 is a very old version of the SDK. Did you try to use a newer version?
What happened
Hello,
I am encountering an issue when trying to use the starknet.py library with a smart contract that utilizes the felt252 type.
API I'm using: https://github.com/influenceth/sdk/blob/master/src/contracts/starknet_events.json
With the function ExtractResourceFinish
Stack trace
Erreur lors de l'exécution de la transaction : Type 'felt252' is not defined. Please report this issue at https://github.com/software-mansion/starknet.py/issues
Traceback complet de l'erreur :
Traceback (most recent call last):
File "path/to/my/script.py", line 106, in main
contract = Contract(
^^^^^^^^^
File "path/to/starknet_py/contract.py", line 746, in init
self._functions = self._make_functions(
^^^^^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/contract.py", line 1075, in _make_functions
repository[name] = ContractFunction(
^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/contract.py", line 543, in init
function = contract_data.parsed_abi.functions.get(name)
^^^^^^^^^^^^^^^^^^^^^^^^
File "path/to/functools.py", line 995, in get
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/contract.py", line 74, in parsed_abi
return AbiParserV1(self.abi).parse()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/abi/v1/parser.py", line 89, in parse
name: self._parse_function(entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/abi/v1/parser.py", line 173, in _parse_function
inputs=self._parse_members(function["inputs"], function["name"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path/to/starknet_py/abi/v1/parser.py", line 191, in _parse_members
return OrderedDict(
^^^^^^^^^^^^
File "path/to/starknet_py/abi/v1/parser.py", line 192, in
(name, self.type_parser.parse_inline_type(param["type"]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "path/to/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 'felt252' is not defined. Please report this issue at https://github.com/software-mansion/starknet.py/issues
Steps to reproduce
from starknet_py.contract import Contract
Assuming ABI data is loaded from a source, here represented as a dictionary
abi_data = {
'name': 'ExampleFunction',
'type': 'function',
'inputs': [{'name': 'example_input', 'type': 'felt252'}],
'outputs': [],
'stateMutability': 'external'
}
contract = Contract(address="0x0422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4", abi=[abi_data])
SDK Version
SDK Version: starknet.py version 0.4.7
Python version
3.9
What operating system are you using?
Windows
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: