diff --git a/prizetap/tasks.py b/prizetap/tasks.py index 933dd8d9..02b30e8b 100644 --- a/prizetap/tasks.py +++ b/prizetap/tasks.py @@ -136,15 +136,14 @@ def draw_linea_raffle(raffle: Raffle): muon_data = muon_response['data']['result'] raffle_client = LineaPrizetapContractClient(raffle) tx_hash = raffle_client.draw_raffle( - raffle.raffleId, muon_data['expirationTime'], muon_data['randomWords'], muon_response['reqId'], - ( + [ muon_response['signatures'][0]['signature'], muon_response['signatures'][0]['owner'], muon_response['data']['init']['nonceAddress'] - ), + ], muon_response['shieldSignature'] ) print(tx_hash) diff --git a/prizetap/utils.py b/prizetap/utils.py index e49cb0f3..ca0c7bb1 100644 --- a/prizetap/utils.py +++ b/prizetap/utils.py @@ -18,15 +18,8 @@ def __init__(self, raffle) -> None: self.set_contract(self.raffle.contract, abi) self.set_account(self.raffle.chain.wallet.private_key) - def draw_raffle(self, expiration_time, random_words, reqId, muon_sig, gateway_sig): - func = self.contract.functions.drawRaffle( - self.raffle.raffleId, - expiration_time, - random_words, - reqId, - muon_sig, - gateway_sig - ) + def draw_raffle(self): + func = self.contract.functions.heldRaffle(self.raffle.raffleId) return self.contract_txn(func) def get_raffle_winner(self): @@ -40,6 +33,17 @@ def __init__(self, raffle) -> None: abi = LINEA_PRIZETAP_ABI self.set_contract(self.raffle.contract, abi) + def draw_raffle(self, expiration_time, random_words, reqId, muon_sig, gateway_sig): + func = self.contract.functions.drawRaffle( + self.raffle.raffleId, + expiration_time, + random_words, + reqId, + muon_sig, + gateway_sig + ) + return self.contract_txn(func) + def get_raffle_winners(self): func = self.contract.functions.getWinners(self.raffle.raffleId) return self.contract_call(func)