Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayanShiravani committed Oct 16, 2023
1 parent d9fe2cd commit 9620566
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
5 changes: 2 additions & 3 deletions prizetap/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
22 changes: 13 additions & 9 deletions prizetap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand Down

0 comments on commit 9620566

Please sign in to comment.