From fff41f3d6a97cf77b5f4f17ab884438f20e21564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schmidt=20Cristian=20Hern=C3=A1n?= Date: Sun, 25 Aug 2024 03:39:49 -0300 Subject: [PATCH] add reset of conditions in the contract --- packages/hardhat/contracts/Controller.sol | 3 +++ packages/nextjs/contracts/deployedContracts.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/hardhat/contracts/Controller.sol b/packages/hardhat/contracts/Controller.sol index 599ad9a..cdf210a 100644 --- a/packages/hardhat/contracts/Controller.sol +++ b/packages/hardhat/contracts/Controller.sol @@ -125,6 +125,9 @@ contract Controller is Ownable { // Transfer + trainingCount[receiver] = 0; + trainingTimestamp[receiver] = 0; + (bool success, ) = receiver.call{ value: reward }(""); require(success, "Transfer failed"); diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 1c0ae22..0775af7 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -7,7 +7,7 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; const deployedContracts = { 31337: { Controller: { - address: "0x5FbDB2315678afecb367f032d93F642f64180aa3", + address: "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", abi: [ { inputs: [