setup for goerli
90cbf65a
3 file(s) · +14 −11
Binary file — no preview.
| 9 | 9 | url: `${process.env.ALCHEMY_URL}`, |
|
| 10 | 10 | accounts: [process.env.PRIVATE_KEY] |
|
| 11 | 11 | }, |
|
| 12 | - | scroll: { |
|
| 13 | - | url: "https://sepolia-rpc.scroll.io/", |
|
| 14 | - | accounts: [process.env.PRIVATE_KEY] |
|
| 12 | + | scrollSepolia: { |
|
| 13 | + | url: "https://sepolia-rpc.scroll.io/" || "", |
|
| 14 | + | accounts: |
|
| 15 | + | process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], |
|
| 15 | 16 | }, |
|
| 16 | 17 | } |
|
| 17 | 18 |
| 15 | 15 | const NPCContract = await ethers.getContractFactory("CosmicCowboys"); |
|
| 16 | 16 | const npcContract = await NPCContract.deploy(owner.address); |
|
| 17 | 17 | const npcContractAddress = await npcContract.getAddress() |
|
| 18 | - | console.log("NPC Contract deploywed to address:", npcContractAddress); |
|
| 18 | + | console.log("NPC Contract deployed to address:", npcContractAddress); |
|
| 19 | 19 | ||
| 20 | 20 | // Deploy ERC-20 Contract |
|
| 21 | 21 | const CurrencyContract = await ethers.getContractFactory("GoldenCorn"); |
|
| 22 | 22 | const currencyContract = await CurrencyContract.deploy(owner.address); |
|
| 23 | 23 | const currencyContractAddress = await currencyContract.getAddress() |
|
| 24 | - | console.log("NPC Contract deploywed to address:", currencyContractAddress); |
|
| 24 | + | console.log("Currency Contract deployed to address:", currencyContractAddress); |
|
| 25 | 25 | ||
| 26 | 26 | // Deploy 1155 Contracts |
|
| 27 | 27 | const FoodContract = await ethers.getContractFactory("SpaceSlop"); |
|
| 28 | 28 | const foodContract = await FoodContract.deploy(owner.address); |
|
| 29 | 29 | const foodContractAddress = await foodContract.getAddress() |
|
| 30 | - | console.log("NPC Contract deploywed to address:", foodContractAddress); |
|
| 30 | + | console.log("Food Contract deployed to address:", foodContractAddress); |
|
| 31 | 31 | ||
| 32 | 32 | const SupplyContract = await ethers.getContractFactory("JupiterJunk"); |
|
| 33 | 33 | const supplyContract = await SupplyContract.deploy(owner.address); |
|
| 34 | 34 | const supplyContractAddress = await supplyContract.getAddress() |
|
| 35 | - | console.log("NPC Contract deploywed to address:", supplyContractAddress); |
|
| 35 | + | console.log("Supply Contract deployed to address:", supplyContractAddress); |
|
| 36 | 36 | ||
| 37 | 37 | // Deploy ERC6551 |
|
| 38 | - | const RegistryContract = await ethers.getContractFactory("ERC6551Registry"); |
|
| 38 | + | /* const RegistryContract = await ethers.getContractFactory("ERC6551Registry"); |
|
| 39 | 39 | const registryContract = await RegistryContract.deploy(); |
|
| 40 | 40 | const registryContractAddress = await registryContract.getAddress() |
|
| 41 | 41 | console.log("Registry Contract deployed to address:", registryContractAddress); |
|
| 43 | 43 | const AccountContract = await ethers.getContractFactory("ERC6551Account"); |
|
| 44 | 44 | const accountContract = await AccountContract.deploy(); |
|
| 45 | 45 | const accountContractAddress = await accountContract.getAddress() |
|
| 46 | - | console.log("Account Contract deployed to address:", accountContractAddress); |
|
| 46 | + | console.log("Account Contract deployed to address:", accountContractAddress); */ |
|
| 47 | 47 | ||
| 48 | 48 | // Deploy Operator Contract |
|
| 49 | 49 | const OperatorContract = await ethers.getContractFactory("Operator"); |
|
| 57 | 57 | await foodContract.transferOwnership(operatorContractAddress); |
|
| 58 | 58 | await supplyContract.transferOwnership(operatorContractAddress); |
|
| 59 | 59 | ||
| 60 | - | // create NPC |
|
| 60 | + | /* // create NPC |
|
| 61 | 61 | const npcTx = await operatorContract.createNPC(owner.address, "ipfs://") |
|
| 62 | 62 | const npcTxReceipt = await npcTx.wait() |
|
| 63 | 63 | ||
| 75 | 75 | "0x" |
|
| 76 | 76 | ) |
|
| 77 | 77 | deployedAccountReceipt = await deployedAccountTx.wait() |
|
| 78 | - | console.log(deployedAccountReceipt) |
|
| 78 | + | console.log(deployedAccountReceipt) */ |
|
| 79 | 79 | ||
| 80 | 80 | // equip NPC via TBA |
|
| 81 | 81 | ||
| 82 | 82 | } |
|
| 83 | + | ||
| 84 | + | Operator() |
|