Skip to content

Commit

Permalink
🐛 Fix Sake transact params
Browse files Browse the repository at this point in the history
  • Loading branch information
soyrubio committed Oct 16, 2024
1 parent 90d2591 commit 7b9d8b3
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions wake/lsp/sake.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,32 +99,28 @@ class SakeDeployResult(SakeResult):
call_trace: Dict[str, Union[Optional[str], List]]


class SakeTransactParams(LspModel):
class SakeCallParams(SakeParams):
contract_address: str
sender: str
calldata: str
value: int


class SakeCallResult(SakeResult):
return_value: str
call_trace: Optional[Dict[str, Union[Optional[str], List]]]


class SakeTransactParams(SakeCallParams):
pass

class SakeTransactResult(SakeResult):
return_value: Optional[str] # raw hex encoded bytes, None for Halt
error: Optional[str] # user-friendly error string, None for Success
tx_receipt: Dict[str, Any]
call_trace: Dict[str, Union[Optional[str], List]]


class SakeCallParams(SakeParams):
contract_address: str
sender: str
calldata: str
value: int


class SakeCallResult(SakeResult):
return_value: str
call_trace: Optional[Dict[str, Union[Optional[str], List]]]


class SakeGetBalancesParams(SakeParams):
addresses: List[str]

Expand Down Expand Up @@ -566,7 +562,7 @@ def fqn_to_contract_abi(fqn: str):
raise LspError(ErrorCodes.InternalError, str(e)) from None

@chain_connected
async def transact(self, params: SakeCallParams) -> SakeTransactResult:
async def transact(self, params: SakeTransactParams) -> SakeTransactResult:
chain = self.chains[params.session_id][0]

def fqn_to_contract_abi(fqn: str):
Expand Down

0 comments on commit 7b9d8b3

Please sign in to comment.