Skip to content

Commit

Permalink
Restaring
Browse files Browse the repository at this point in the history
  • Loading branch information
Radinyn committed Aug 8, 2022
1 parent 27f1f01 commit 20692ec
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion protostar/starknet_gateway/gateway_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from starknet_py.net.gateway_client import GatewayClient
from starknet_py.transactions.deploy import make_deploy_tx
from starknet_py.transactions.declare import make_declare_tx
from starknet_py.net.models import StarknetChainId
from starknet_py.net.models import StarknetChainId, AddressRepresentation
from starknet_py.contract import Contract

from protostar.protostar_exception import ProtostarException
from protostar.starknet_gateway.gateway_response import (
Expand Down Expand Up @@ -185,6 +186,17 @@ async def declare(
transaction_hash=result.transaction_hash,
)

async def call(self, address: AddressRepresentation, function_name: str):
contract = await Contract.from_address(
address=address, client=self._gateway_client
)
contract.functions[function_name].call()

pass

async def invoke(self):
pass

def _register_request(
self, action: StarknetRequest.Action, payload: StarknetRequest.Payload
) -> Callable[[StarknetRequest.Payload], None]:
Expand Down

0 comments on commit 20692ec

Please sign in to comment.