update abi

This commit is contained in:
zhl 2023-01-10 17:25:24 +08:00
parent 04770f2bd4
commit 2dfe12756d
18 changed files with 11380 additions and 136 deletions

View File

@ -46131,7 +46131,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:46.988Z",
"updatedAt": "2023-01-10T09:15:27.639Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -29743,7 +29743,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:28.455Z",
"updatedAt": "2023-01-10T09:13:36.539Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -9829,7 +9829,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:12.230Z",
"updatedAt": "2023-01-10T09:12:43.611Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -22571,7 +22571,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:25.027Z",
"updatedAt": "2023-01-10T09:13:26.066Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -11967,7 +11967,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:16.467Z",
"updatedAt": "2023-01-10T09:13:00.069Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -22767,7 +22767,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:20.712Z",
"updatedAt": "2023-01-10T09:13:13.705Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

File diff suppressed because it is too large Load Diff

View File

@ -46109,7 +46109,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:57.124Z",
"updatedAt": "2023-01-10T09:16:07.131Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -26363,7 +26363,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:08.137Z",
"updatedAt": "2023-01-10T09:12:17.382Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -29138,7 +29138,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:32.956Z",
"updatedAt": "2023-01-10T09:14:07.976Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -25437,7 +25437,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:42:07.285Z",
"updatedAt": "2023-01-10T09:16:23.469Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -33503,7 +33503,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:53.713Z",
"updatedAt": "2023-01-10T09:15:57.221Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -3234,8 +3234,8 @@
"transactionHash": "0x3963c496ad636403fa000de1dd33d0c363f7f3104afa6f2140d13dedaccb56a6"
}
},
"schemaVersion": "3.4.11",
"updatedAt": "2023-01-05T09:11:36.246Z",
"schemaVersion": "3.4.4",
"updatedAt": "2023-01-10T09:16:23.476Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -57056,7 +57056,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:39.245Z",
"updatedAt": "2023-01-10T09:14:24.980Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -49916,7 +49916,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:42:02.032Z",
"updatedAt": "2023-01-10T09:16:14.578Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -14963,7 +14963,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:53.726Z",
"updatedAt": "2023-01-10T09:15:57.234Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -28699,7 +28699,7 @@
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-12-08T03:41:39.272Z",
"updatedAt": "2023-01-10T09:14:24.998Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -33,11 +33,11 @@ module.exports = async function main(callback) {
config.market.paymentTokens.push(goldInstance.address);
config.market.paymentTokens.push(usdtInstance.address);
// await heroInstance.updateBaseURI(config.token.baseTokenURI);
// console.log("BEHero baseURI update success.");
await heroInstance.updateBaseURI(config.token.baseTokenURI);
console.log("BEHero baseURI update success.");
// await equipInstance.updateBaseURI(config.token.baseTokenURI);
// console.log("Equip baseURI update success.");
await equipInstance.updateBaseURI(config.token.baseTokenURI);
console.log("Equip baseURI update success.");
const marketInstance = await MarketPlace.deployed();
const ROUND = 1000000;
@ -88,6 +88,7 @@ module.exports = async function main(callback) {
);
for (let token of config.market.paymentTokens) {
await marketInstance.addERC20Support(token);
console.log(`add token for market payment: ${token}`)
}
console.log(`finish update market config`);
@ -102,110 +103,110 @@ module.exports = async function main(callback) {
// await chipInstance.setApprovalForAll(marketInstance.address, true);
// console.log("finish chipInstance.addApprovalWhitelist");
// await heroInstance.grantLockRole(config.admins.admin);
// await equipInstance.grantLockRole(config.admins.admin);
// await chipInstance.grantLockRole(config.admins.admin);
// await shardInstance.grantLockRole(config.admins.admin);
// console.log(
// `Allow operation ${marketInstance.address} to reduce gas fee`
// );
await heroInstance.grantLockRole(config.admins.admin);
await equipInstance.grantLockRole(config.admins.admin);
await chipInstance.grantLockRole(config.admins.admin);
await shardInstance.grantLockRole(config.admins.admin);
console.log(
`Allow operation ${marketInstance.address} to reduce gas fee`
);
}
// const factoryInstance = await MinterFactory.deployed();
// if (!factoryInstance) {
// console.error("no factoryInstance");
const factoryInstance = await MinterFactory.deployed();
if (!factoryInstance) {
console.error("no factoryInstance");
return;
}
await factoryInstance.init([
heroInstance.address,
equipInstance.address,
chipInstance.address,
shardInstance.address,
]);
await factoryInstance.setFeeToAddress(config.market.feeToAddress);
await factoryInstance.updateExecutor(config.admins.admin);
await heroInstance.setMintFactory(factoryInstance.address);
await equipInstance.setMintFactory(factoryInstance.address);
await chipInstance.setMintFactory(factoryInstance.address);
await shardInstance.setMintFactory(factoryInstance.address);
console.log(
`Allow factory ${factoryInstance.address} to mint contract \n hero: ${heroInstance.address}, \n equip: ${equipInstance.address}, \n chip: ${chipInstance.address}`
);
await heroInstance.grantBurnRole(factoryInstance.address);
await equipInstance.grantBurnRole(factoryInstance.address);
await chipInstance.grantBurnRole(factoryInstance.address);
await shardInstance.grantBurnRole(factoryInstance.address);
console.log(
`Allow factory ${factoryInstance.address} to burn contract \n hero: ${heroInstance.address}, \n equip: ${equipInstance.address}, \n chip: ${chipInstance.address}`
);
const userFactoryInstance = await UserMinterFactory.deployed();
if (!userFactoryInstance) {
console.error("no userFactoryInstance");
return;
}
await factoryInstance.addApprovalList(userFactoryInstance.address);
await userFactoryInstance.init([
heroInstance.address,
equipInstance.address,
chipInstance.address,
shardInstance.address,
factoryInstance.address,
]);
const proxyInstance = await EvolveFactory.deployed();
if (!proxyInstance) {
console.error("no proxyInstance");
return;
}
await proxyInstance.init(chipInstance.address);
await proxyInstance.addNFTTokenSupport(heroInstance.address);
await proxyInstance.addNFTTokenSupport(equipInstance.address);
await proxyInstance.updateExecutor(config.admins.admin);
await heroInstance.grantBurnRole(proxyInstance.address);
await equipInstance.grantBurnRole(proxyInstance.address);
await chipInstance.grantBurnRole(proxyInstance.address);
console.log(
`Allow proxy ${proxyInstance.address} to burn contract \n hero: ${heroInstance.address}, \n equip: ${equipInstance.address}, \n chip: ${chipInstance.address}`
);
const userProxyInstance = await UserEvolveFactory.deployed();
if (!userProxyInstance) {
console.error("no userProxyInstance");
return;
}
await proxyInstance.addApprovalList(userProxyInstance.address);
await userProxyInstance.init(proxyInstance.address);
// const boxInstance = await BEBoxMall.deployed();
// if (!boxInstance) {
// console.error("no boxInstance");
// return;
// }
// await factoryInstance.init([
// heroInstance.address,
// equipInstance.address,
// chipInstance.address,
// shardInstance.address,
// ]);
// await factoryInstance.setFeeToAddress(config.market.feeToAddress);
// await factoryInstance.updateExecutor(config.admins.admin);
// await heroInstance.setMintFactory(factoryInstance.address);
// await equipInstance.setMintFactory(factoryInstance.address);
// await chipInstance.setMintFactory(factoryInstance.address);
// await shardInstance.setMintFactory(factoryInstance.address);
// await boxInstance.setPaymentReceivedAddress(config.market.mallFeeAddress);
// console.log(
// `Allow factory ${factoryInstance.address} to mint contract \n hero: ${heroInstance.address}, \n equip: ${equipInstance.address}, \n chip: ${chipInstance.address}`
// );
// await heroInstance.grantBurnRole(factoryInstance.address);
// await equipInstance.grantBurnRole(factoryInstance.address);
// await chipInstance.grantBurnRole(factoryInstance.address);
// await shardInstance.grantBurnRole(factoryInstance.address);
// console.log(
// `Allow factory ${factoryInstance.address} to burn contract \n hero: ${heroInstance.address}, \n equip: ${equipInstance.address}, \n chip: ${chipInstance.address}`
// `update payment received address: ${config.market.mallFeeAddress}`
// );
// const userFactoryInstance = await UserMinterFactory.deployed();
// if (!userFactoryInstance) {
// console.error("no userFactoryInstance");
// return;
// }
// await factoryInstance.addApprovalList(userFactoryInstance.address);
// await userFactoryInstance.init([
// heroInstance.address,
// equipInstance.address,
// chipInstance.address,
// shardInstance.address,
// factoryInstance.address,
// ]);
// const proxyInstance = await EvolveFactory.deployed();
// if (!proxyInstance) {
// console.error("no proxyInstance");
// return;
// }
// await proxyInstance.init(chipInstance.address);
// await proxyInstance.addNFTTokenSupport(heroInstance.address);
// await proxyInstance.addNFTTokenSupport(equipInstance.address);
// await proxyInstance.updateExecutor(config.admins.admin);
// await heroInstance.grantBurnRole(proxyInstance.address);
// await equipInstance.grantBurnRole(proxyInstance.address);
// await chipInstance.grantBurnRole(proxyInstance.address);
// console.log(
// `Allow proxy ${proxyInstance.address} to burn contract \n hero: ${heroInstance.address}, \n equip: ${equipInstance.address}, \n chip: ${chipInstance.address}`
// );
// const userProxyInstance = await UserEvolveFactory.deployed();
// if (!userProxyInstance) {
// console.error("no userProxyInstance");
// return;
// }
// await proxyInstance.addApprovalList(userProxyInstance.address);
// await userProxyInstance.init(proxyInstance.address);
// // const boxInstance = await BEBoxMall.deployed();
// // if (!boxInstance) {
// // console.error("no boxInstance");
// // return;
// // }
// // await boxInstance.setPaymentReceivedAddress(config.market.mallFeeAddress);
// // console.log(
// // `update payment received address: ${config.market.mallFeeAddress}`
// // );
// const nftMallInstance = await BENftMall.deployed();
// if (nftMallInstance) {
// await nftMallInstance.setFeeToAddress(config.market.feeToAddress);
// await nftMallInstance.setPaymentTokens(config.market.paymentTokens);
// await nftMallInstance.addNFTTokenSupport(heroInstance.address);
// await nftMallInstance.addNFTTokenSupport(equipInstance.address);
// await nftMallInstance.addNFTTokenSupport(chipInstance.address);
// await heroInstance.setMintFactory(nftMallInstance.address);
// await equipInstance.setMintFactory(nftMallInstance.address);
// await chipInstance.setMintFactory(nftMallInstance.address);
// console.log("update nftMallInstance settings success");
// }
// const lockerInstance = await NftChipLocker.deployed();
// if (lockerInstance) {
// await lockerInstance.addNFTTokenSupport(heroInstance.address);
// await lockerInstance.addNFTTokenSupport(equipInstance.address);
// await lockerInstance.addNFTTokenSupport(chipInstance.address);
// console.log("update NftChipLocker addNFTTokenSupport success");
// }
const nftMallInstance = await BENftMall.deployed();
if (nftMallInstance) {
await nftMallInstance.setFeeToAddress(config.market.feeToAddress);
await nftMallInstance.setPaymentTokens(config.market.paymentTokens);
await nftMallInstance.addNFTTokenSupport(heroInstance.address);
await nftMallInstance.addNFTTokenSupport(equipInstance.address);
await nftMallInstance.addNFTTokenSupport(chipInstance.address);
await heroInstance.setMintFactory(nftMallInstance.address);
await equipInstance.setMintFactory(nftMallInstance.address);
await chipInstance.setMintFactory(nftMallInstance.address);
console.log("update nftMallInstance settings success");
}
const lockerInstance = await NftChipLocker.deployed();
if (lockerInstance) {
await lockerInstance.addNFTTokenSupport(heroInstance.address);
await lockerInstance.addNFTTokenSupport(equipInstance.address);
await lockerInstance.addNFTTokenSupport(chipInstance.address);
console.log("update NftChipLocker addNFTTokenSupport success");
}
callback(0);
} catch (error) {
console.error(error);