fix erc1155 && erc20
This commit is contained in:
@@ -74,7 +74,7 @@ module.exports = {
|
||||
DODONFTProxy: "",
|
||||
|
||||
//================= MysteryBox =================
|
||||
MysteryBoxV1: "0xbfb19a7e788b2fbC47Bc9013694C6854Ce0e1fAd",
|
||||
MysteryBoxV1: "0x47d2b27525b93A9c9E03001E1D19310A08748D55",
|
||||
RandomGenerator: "0x53F54E4760FA5f839e5624782D032495613DF218",
|
||||
RandomPool: [
|
||||
"0xa2e0ef85618732d80e5ef362773da1c92e8b1c57",
|
||||
|
||||
@@ -16,16 +16,19 @@ interface IQuota {
|
||||
contract UserQuota is Ownable, IQuota {
|
||||
|
||||
mapping(address => uint256) public userQuota;
|
||||
uint256 constant quota = 375 * 10**6; //For example 375u on eth
|
||||
|
||||
event SetQuota(address user, uint256 amount);
|
||||
|
||||
function setUserQuota(address[] memory users) external onlyOwner {
|
||||
function setUserQuota(address[] memory users, uint256[] memory quotas) external onlyOwner {
|
||||
require(users.length == quotas.length, "PARAMS_LENGTH_NOT_MATCH");
|
||||
for(uint256 i = 0; i< users.length; i++) {
|
||||
require(users[i] != address(0), "USER_INVALID");
|
||||
userQuota[users[i]] = quota;
|
||||
userQuota[users[i]] = quotas[i];
|
||||
emit SetQuota(users[i],quotas[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function getUserQuota(address user) override external view returns (int) {
|
||||
return int(userQuota[user]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,15 @@ contract InitializableERC1155 is ERC1155 {
|
||||
|
||||
mapping (uint256 => string) private _tokenURIs;
|
||||
string internal _baseUri = "";
|
||||
bool internal _INITIALIZED_;
|
||||
|
||||
function init(
|
||||
address creator,
|
||||
uint256 amount,
|
||||
string memory uri
|
||||
) public {
|
||||
require(!_INITIALIZED_, "INITIALIZED");
|
||||
_INITIALIZED_ = true;
|
||||
_mint(creator, 0, amount ,"");
|
||||
_setTokenURI(0, uri);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ contract InitializableERC20 {
|
||||
|
||||
bool public initialized;
|
||||
|
||||
mapping(address => uint256) balances;
|
||||
mapping(address => uint256) internal balances;
|
||||
mapping(address => mapping(address => uint256)) internal allowed;
|
||||
|
||||
event Transfer(address indexed from, address indexed to, uint256 amount);
|
||||
|
||||
@@ -18,7 +18,7 @@ contract InitializableMintableERC20 is InitializableOwnable {
|
||||
string public symbol;
|
||||
uint256 public totalSupply;
|
||||
|
||||
mapping(address => uint256) balances;
|
||||
mapping(address => uint256) internal balances;
|
||||
mapping(address => mapping(address => uint256)) internal allowed;
|
||||
|
||||
event Transfer(address indexed from, address indexed to, uint256 amount);
|
||||
|
||||
@@ -249,3 +249,9 @@ Init DODONFTProxyAddress Tx: 0xc8052841c2f8641e039f13ba13cafd5cf238fb14b455ab61b
|
||||
DODOApproveProxy unlockAddProxy tx: 0x7968ba876ec167759cfaa66e26c8b3d6c920bade8c6a29a160b62f6642a68a17
|
||||
DODOApproveProxy addDODOProxy tx: 0xc1d54e062795d2a1fead453813cfb9f96723a9330905827c710ea8c7e63a34e3
|
||||
Add AdminList on DODONFTRegistry Tx: 0xcb1f687db83b48f1928610c2c04f4685666502a3d17986bb541cbd41b15fa2a9
|
||||
====================================================
|
||||
network type: kovan
|
||||
Deploy time: 2021/5/6 上午9:45:28
|
||||
Deploy type: MysteryBoxV1
|
||||
MysteryBoxV1Address: 0x47d2b27525b93A9c9E03001E1D19310A08748D55
|
||||
Init MysteryBoxV1 Tx: 0xa76bca56c6974b8760390e3b5181ef5e01fa3254aa868eebb4e285d617f835fc
|
||||
|
||||
Reference in New Issue
Block a user