修正批量mint时, 如果传入数量少于用户可mint数量时, 会被撤销的bug
This commit is contained in:
parent
d35db0b407
commit
81b4465341
@ -31421,7 +31421,7 @@
|
||||
}
|
||||
},
|
||||
"schemaVersion": "3.4.11",
|
||||
"updatedAt": "2023-04-23T02:44:39.956Z",
|
||||
"updatedAt": "2023-04-26T07:39:54.101Z",
|
||||
"networkType": "ethereum",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
|
@ -34799,7 +34799,7 @@
|
||||
}
|
||||
},
|
||||
"schemaVersion": "3.4.11",
|
||||
"updatedAt": "2023-04-23T02:44:39.976Z",
|
||||
"updatedAt": "2023-04-26T07:39:54.120Z",
|
||||
"networkType": "ethereum",
|
||||
"devdoc": {
|
||||
"events": {
|
||||
|
@ -16789,7 +16789,7 @@
|
||||
}
|
||||
},
|
||||
"schemaVersion": "3.4.11",
|
||||
"updatedAt": "2023-04-23T02:44:39.968Z",
|
||||
"updatedAt": "2023-04-26T07:39:54.112Z",
|
||||
"networkType": "ethereum",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
|
@ -3235,7 +3235,7 @@
|
||||
}
|
||||
},
|
||||
"schemaVersion": "3.4.11",
|
||||
"updatedAt": "2023-04-23T02:44:39.989Z",
|
||||
"updatedAt": "2023-04-26T07:39:54.133Z",
|
||||
"networkType": "ethereum",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
@ -83,7 +83,7 @@ contract NftDistributor is AccessControlEnumerable {
|
||||
for (uint256 i = 0; i < nfts.length; i++) {
|
||||
uint256 nftSId = nfts[i];
|
||||
// Check if the NFT is mintable
|
||||
if (!nftMinted[nftSId]) {
|
||||
if (!nftMinted[nftSId] && index < count) {
|
||||
// Add the NFT's source ID to the list of sources
|
||||
nftSource[index] = nftSId;
|
||||
nftMinted[nftSId] = true;
|
||||
|
@ -36,12 +36,6 @@ contract BEBadge is AccessControl, ERC721Enumerable {
|
||||
return _baseTokenURI;
|
||||
}
|
||||
|
||||
function setBaseURI(
|
||||
string memory baseURI_
|
||||
) external onlyRole(DEFAULT_ADMIN_ROLE) {
|
||||
_baseTokenURI = baseURI_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Batch mint tokens and transfer to specified address.
|
||||
*
|
||||
|
@ -5,36 +5,36 @@ const Distributor = artifacts.require("logic/NftDistributor");
|
||||
const config = require("../config/config");
|
||||
|
||||
module.exports = async function (deployer, network, accounts) {
|
||||
await deployer.deploy(Badge, "BE Badge", "Badge", "0");
|
||||
// await deployer.deploy(Badge, "BE Badge", "Badge", "0");
|
||||
const badgeInstance = await Badge.deployed();
|
||||
if (badgeInstance) {
|
||||
console.log("BEBadge successfully deployed. ");
|
||||
console.log("address: " + badgeInstance.address);
|
||||
}
|
||||
await badgeInstance.updateBaseURI(config.token.baseTokenURI);
|
||||
// await badgeInstance.updateBaseURI(config.token.baseTokenURI);
|
||||
// await deployer.deploy(Coin, "BE test USDT", "USDT");
|
||||
const coinInstance = await Coin.deployed();
|
||||
// if (coinInstance) {
|
||||
// console.log("BEUSDT successfully deployed. ");
|
||||
// console.log("address: " + coinInstance.address);
|
||||
// }
|
||||
await deployer.deploy(
|
||||
Wallet,
|
||||
60,
|
||||
1,
|
||||
config.admins.proposers,
|
||||
config.admins.confirmers,
|
||||
config.admins.executors
|
||||
);
|
||||
// await deployer.deploy(
|
||||
// Wallet,
|
||||
// 60,
|
||||
// 1,
|
||||
// config.admins.proposers,
|
||||
// config.admins.confirmers,
|
||||
// config.admins.executors
|
||||
// );
|
||||
const walletInstance = await Wallet.deployed();
|
||||
if (walletInstance) {
|
||||
console.log("BEMultiSigWallet successfully deployed.");
|
||||
console.log("address: " + walletInstance.address);
|
||||
}
|
||||
await badgeInstance.setMintRole(walletInstance.address);
|
||||
console.log("success add wallet to badge's mint role");
|
||||
await coinInstance.setMintRole(walletInstance.address);
|
||||
console.log("success add wallet to usdt's mint role");
|
||||
// await badgeInstance.setMintRole(walletInstance.address);
|
||||
// console.log("success add wallet to badge's mint role");
|
||||
// await coinInstance.setMintRole(walletInstance.address);
|
||||
// console.log("success add wallet to usdt's mint role");
|
||||
|
||||
await deployer.deploy(
|
||||
Distributor,
|
||||
|
Loading…
x
Reference in New Issue
Block a user