update userQuota template

This commit is contained in:
owen05
2021-06-11 14:23:43 +08:00
parent 88b546b160
commit 3ec2e141cc

View File

@@ -9,7 +9,11 @@ pragma solidity 0.6.9;
import {Ownable} from "../lib/Ownable.sol";
contract UserQuota is Ownable {
interface IQuota {
function getUserQuota(address user) external view returns (int);
}
contract UserQuota is Ownable, IQuota {
mapping(address => uint256) public userQuota;
uint256 constant quota = 375 * 10**6; //For example 375u on eth
@@ -21,7 +25,7 @@ contract UserQuota is Ownable {
}
}
function getUserQuota(address user) external view returns (uint256) {
return userQuota[user];
function getUserQuota(address user) override external view returns (int) {
return int(userQuota[user]);
}
}