Skip to content

Commit dcb44c7

Browse files
Updated testnet contract
* Add Deadpool contract and MockERC20 for testing; implement pool creation, deposit, finalization, and reward claiming functionalities. * Fix expected event arguments in Deadpool pool creation test to match correct timestamp calculation. * Implement platform fee management in Deadpool contract; add default fee, update event emissions, and modify tests accordingly. * Update Deadpool contract: change deployed address, remove old platform fee parameter, and add new platform fee update event and functions. * Refactor Deadpool tests: streamline expect statements, remove unnecessary whitespace, and ensure consistent formatting for better readability. * Add Monad testnet configuration and deploy Deadpool contract; update DEX router address and include deployment artifacts for Monad testnet. * Sync with main branch * Update Deadpool contract deployment details and add new solc input file - Change deployed address for the Deadpool contract in both the JSON deployment file and the TypeScript contract declaration. - Update transaction hash and block number to reflect the latest deployment. - Introduce a new solc input file for the updated contract version, including necessary OpenZeppelin dependencies and contract metadata. --------- Co-authored-by: Lokeshwaran B <Lokeshwaran B>
1 parent f03dc1a commit dcb44c7

File tree

4 files changed

+122
-48
lines changed

4 files changed

+122
-48
lines changed

packages/hardhat/contracts/Deadpool.sol

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ contract Deadpool is Ownable, ReentrancyGuard {
2020
// Constants
2121
uint256 public constant MAX_PLATFORM_FEE_BPS = 1000; // 10% max platform fee
2222
uint256 public constant BPS_DENOMINATOR = 10000;
23-
uint256 public constant MIN_POOL_DURATION = 1 hours;
23+
uint256 public constant MIN_POOL_DURATION = 1 minutes;
2424
uint256 public constant MAX_POOL_DURATION = 30 days;
2525

2626
// State Variables
@@ -183,7 +183,9 @@ contract Deadpool is Ownable, ReentrancyGuard {
183183
IERC20 token = IERC20(pool.tokenAddress);
184184

185185
// Transfer tokens from user to contract
186-
token.safeTransferFrom(msg.sender, address(this), amount);
186+
// token.safeTransferFrom(msg.sender, address(this), amount);
187+
token.transferFrom(msg.sender, address(this), amount);
188+
187189

188190
// Update pool state
189191
if (pool.deposits[msg.sender] == 0) {

packages/hardhat/deployments/monad_testnet/Deadpool.json

Lines changed: 44 additions & 44 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)