Closed popenta closed 5 months ago
Code snippet:
from multiversx_sdk import (ProxyNetworkProvider, QueryRunnerAdapter, SmartContractQueriesController) contract = Address.from_bech32("erd1qqqqqqqqqqqqqpgqqy34h7he2ya6qcagqre7ur7cc65vt0mxrc8qnudkr4") query_runner = QueryRunnerAdapter(ProxyNetworkProvider("https://devnet-api.multiversx.com")) query_controller = SmartContractQueriesController(query_runner) query = query_controller.create_query( contract=contract.to_bech32(), function="getSum", arguments=[], ) response = query_controller.run_query(query) print("Return code:", response.return_code) print("Return data:", response.return_data_parts)
Code snippet: