Skip to content

Commit

Permalink
added approveAllowance function to contrac
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangel90 committed Dec 3, 2024
1 parent 72c2140 commit e90926d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/hardhat/contracts/Lottery.sol
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,13 @@ contract Lottery is Ownable {
paymentToken.burnFrom(msg.sender, amount);
payable(msg.sender).transfer(amount / purchaseRatio);
}

function getBalance(address account)public view returns(uint256 balance) {
balance = paymentToken.balanceOf(account);
}

function approveAllowance(address spender, uint256 amount) external{
paymentToken.approve(spender, amount)
}

}

0 comments on commit e90926d

Please sign in to comment.