add candy depoly
This commit is contained in:
parent
75157129e4
commit
d6fb951424
@ -9,9 +9,10 @@ const market = {
|
|||||||
const admins = {
|
const admins = {
|
||||||
admin: "0xa9ecB9F3A0b54d31ce4a035C89EC7Da4110beB59",
|
admin: "0xa9ecB9F3A0b54d31ce4a035C89EC7Da4110beB59",
|
||||||
proposers: [
|
proposers: [
|
||||||
"0x7E8E62EF14E9ae1a0B1dd753b45AA42Faa6208D7"
|
"0xc1d9c0D5BfEa77bacF6d102B8CEAA4b07f6a0E25"
|
||||||
],
|
],
|
||||||
confirmers: ["0xA86Fc95bB9C663bAec0f97C53cC5338749E0ce39"],
|
confirmers: ["0xA86Fc95bB9C663bAec0f97C53cC5338749E0ce39",
|
||||||
|
"0x93Ee7F7eBAeF20613cFc0137f64Df0157b5fFa69"],
|
||||||
executors: [
|
executors: [
|
||||||
"0xc970c587085108671212F79e7F0Ad30937A44C28"
|
"0xc970c587085108671212F79e7F0Ad30937A44C28"
|
||||||
],
|
],
|
||||||
|
87
migrations/17_deploy_candy.js
Normal file
87
migrations/17_deploy_candy.js
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
const Box = artifacts.require("tokens/erc721/BEBadge");
|
||||||
|
const Metadata = artifacts.require("core/JSONMetadata");
|
||||||
|
const base = require("../scripts/base");
|
||||||
|
const config = require("../config/config");
|
||||||
|
const Distributor = artifacts.require("logic/NftDistributor");
|
||||||
|
|
||||||
|
module.exports = async function (deployer, network, accounts) {
|
||||||
|
const name = "Candy";
|
||||||
|
const symbol = "CANDY";
|
||||||
|
await deployer.deploy(Box, name, symbol, 0);
|
||||||
|
const gachaInstance = await Box.deployed();
|
||||||
|
if (gachaInstance) {
|
||||||
|
console.log("Candy successfully deployed.");
|
||||||
|
}
|
||||||
|
base.updateArray({
|
||||||
|
name: "Candy",
|
||||||
|
type: "erc721",
|
||||||
|
json: "assets/contracts/BEBadge.json",
|
||||||
|
address: gachaInstance.address,
|
||||||
|
network,
|
||||||
|
});
|
||||||
|
|
||||||
|
const metaaddr = '0xfba1F2861718993B94edd5DCe1D06b3Cbe19353d'
|
||||||
|
|
||||||
|
if(network == 'arbitrum_one'){
|
||||||
|
// await deployer.deploy(Metadata);
|
||||||
|
const metadataInstance = await Metadata.deployed();
|
||||||
|
if (metadataInstance) {
|
||||||
|
console.log("metadataInstance successfully deployed.");
|
||||||
|
}
|
||||||
|
// base.updateArray({
|
||||||
|
// name: "JSONMetadata",
|
||||||
|
// type: "logic",
|
||||||
|
// json: "assets/contracts/JSONMetadata.json",
|
||||||
|
// address: metadataInstance.address,
|
||||||
|
// network,
|
||||||
|
// });
|
||||||
|
|
||||||
|
const mtname = name
|
||||||
|
const mtdesc = "this is test badge desc."
|
||||||
|
const mtimg = "https://gateway.pinata.cloud/ipfs/QmWuHBFGirZS7uyGDyEJNBnMjGLsP9Ke4QZaoL2MxYWtat"
|
||||||
|
const mtex = ',"animation_url": "https://gateway.pinata.cloud/ipfs/QmRJAN58RaFZUeor9VhdiqCziujwvwD98zq7xHUnmbzMXW"'
|
||||||
|
|
||||||
|
await metadataInstance.setMetaData(
|
||||||
|
gachaInstance.address,
|
||||||
|
mtname,
|
||||||
|
mtdesc,
|
||||||
|
mtimg,
|
||||||
|
mtex
|
||||||
|
);
|
||||||
|
console.log(`success update metadata for: ${gachaInstance.address}`);
|
||||||
|
|
||||||
|
metaaddr = metadataInstance.address
|
||||||
|
}
|
||||||
|
|
||||||
|
await gachaInstance.updateMetaAddress(metaaddr);
|
||||||
|
console.log(`success update meta address for: ${gachaInstance.address}`);
|
||||||
|
|
||||||
|
const testexec = ['0x93Ee7F7eBAeF20613cFc0137f64Df0157b5fFa69']
|
||||||
|
|
||||||
|
const exec = network == 'arbitrum_one'? config.admins.executors: testexec
|
||||||
|
|
||||||
|
await deployer.deploy(
|
||||||
|
Distributor,
|
||||||
|
gachaInstance.address,
|
||||||
|
exec
|
||||||
|
);
|
||||||
|
const distributorInstance = await Distributor.deployed();
|
||||||
|
if (distributorInstance) {
|
||||||
|
console.log("NftDistributor successfully deployed.");
|
||||||
|
console.log("address: " + distributorInstance.address);
|
||||||
|
}
|
||||||
|
base.updateArray({
|
||||||
|
name: "NftDistributor",
|
||||||
|
type: "logic",
|
||||||
|
json: "assets/contracts/NftDistributor.json",
|
||||||
|
address: distributorInstance.address,
|
||||||
|
network,
|
||||||
|
});
|
||||||
|
await gachaInstance.setMintRole(distributorInstance.address);
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
`success set mint role to: ${walletInstance.address} claim box `
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
};
|
@ -33,14 +33,14 @@ module.exports = async function (deployer, network, accounts) {
|
|||||||
// address: coinInstance.address,
|
// address: coinInstance.address,
|
||||||
// network,
|
// network,
|
||||||
// });
|
// });
|
||||||
// await deployer.deploy(
|
await deployer.deploy(
|
||||||
// Wallet,
|
Wallet,
|
||||||
// 60,
|
60,
|
||||||
// 1,
|
1,
|
||||||
// config.admins.proposers,
|
config.admins.proposers,
|
||||||
// config.admins.confirmers,
|
config.admins.confirmers,
|
||||||
// config.admins.executors
|
config.admins.executors
|
||||||
// );
|
);
|
||||||
const walletInstance = await Wallet.deployed();
|
const walletInstance = await Wallet.deployed();
|
||||||
if (walletInstance) {
|
if (walletInstance) {
|
||||||
console.log("BEMultiSigWallet successfully deployed.");
|
console.log("BEMultiSigWallet successfully deployed.");
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
"genesis_deploy:one": "truffle migrate --network arbitrum_one -f 16 --to 16 --compile-none",
|
"genesis_deploy:one": "truffle migrate --network arbitrum_one -f 16 --to 16 --compile-none",
|
||||||
"genesis_deploy:test": "truffle migrate --network arbitrum_testnet -f 16 --to 16 --compile-none",
|
"genesis_deploy:test": "truffle migrate --network arbitrum_testnet -f 16 --to 16 --compile-none",
|
||||||
"mulwallet:one": "npx truffle exec --network arbitrum_one_self ./init_scripts/generate_mulwallet.js",
|
"mulwallet:one": "npx truffle exec --network arbitrum_one_self ./init_scripts/generate_mulwallet.js",
|
||||||
|
"candy_deploy:test": "truffle migrate --network arbitrum_testnet -f 17 --to 17 --compile-none",
|
||||||
"size": "truffle run contract-size"
|
"size": "truffle run contract-size"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
|
@ -29,6 +29,7 @@ const mnemonic = fs.readFileSync(".secret").toString().trim();
|
|||||||
// web3.eth.defaultAccount = '0x50A8e60041A206AcaA5F844a1104896224be6F39'
|
// web3.eth.defaultAccount = '0x50A8e60041A206AcaA5F844a1104896224be6F39'
|
||||||
const kccTestnetKey =
|
const kccTestnetKey =
|
||||||
"d9ed33809372932059c1ba7b336a33f406b4c55e7430daef8297134c67429d60";
|
"d9ed33809372932059c1ba7b336a33f406b4c55e7430daef8297134c67429d60";
|
||||||
|
const arbTestnetKey = 'd2ec11734b45e4bcfa8a69f79d864edec9467552f9a5a53d22c17dc4a9a4f6ec';
|
||||||
|
|
||||||
const arbOneKey = fs.readFileSync(".key").toString().trim();
|
const arbOneKey = fs.readFileSync(".key").toString().trim();
|
||||||
const arbOneAddr = fs.readFileSync(".addr").toString().trim();
|
const arbOneAddr = fs.readFileSync(".addr").toString().trim();
|
||||||
@ -130,7 +131,7 @@ module.exports = {
|
|||||||
arbitrum_testnet: {
|
arbitrum_testnet: {
|
||||||
provider: () =>
|
provider: () =>
|
||||||
new HDWalletProvider({
|
new HDWalletProvider({
|
||||||
privateKeys: [kccTestnetKey],
|
privateKeys: [arbTestnetKey],
|
||||||
// providerOrUrl: `https://arbitrum-goerli.public.blastapi.io`,
|
// providerOrUrl: `https://arbitrum-goerli.public.blastapi.io`,
|
||||||
providerOrUrl: "https://arbitrum-goerli.publicnode.com",
|
providerOrUrl: "https://arbitrum-goerli.publicnode.com",
|
||||||
pollingInterval: 8000,
|
pollingInterval: 8000,
|
||||||
@ -143,7 +144,7 @@ module.exports = {
|
|||||||
skipDryRun: true,
|
skipDryRun: true,
|
||||||
production: true,
|
production: true,
|
||||||
disableConfirmationListener: true,
|
disableConfirmationListener: true,
|
||||||
from: "0x50A8e60041A206AcaA5F844a1104896224be6F39",
|
from: "0x1cC73CE74BA0BC080e7C0a37cb3a68f435Ab333A",
|
||||||
},
|
},
|
||||||
arbitrum_one: {
|
arbitrum_one: {
|
||||||
provider: () =>
|
provider: () =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user