diff --git a/packages/ethernaut-zeronaut/src/tasks/get-campaign.js b/packages/ethernaut-zeronaut/src/tasks/get-campaign.js index 19978df..d308f1c 100644 --- a/packages/ethernaut-zeronaut/src/tasks/get-campaign.js +++ b/packages/ethernaut-zeronaut/src/tasks/get-campaign.js @@ -34,12 +34,9 @@ require('../scopes/zeronaut') // Get each level's details for (let i = 0; i < campaign.levels.length; i++) { const levelId = campaign.levels[i] - const levelData = await contract.getLevel(levelId) - const levelAddress = levelData.addr - const level = await getLevelContract(hre, levelAddress) const solved = await contract.isLevelSolved(levelId, playerAddress) - const levelName = hre.ethers.decodeBytes32String(await level.name()) - str += `\n [${i + 1}] "${levelName}" ${solved ? '✅' : '❌'}` + const levelName = hre.ethers.decodeBytes32String(levelId) + str += `\n [${i + 1}] "${levelName}" ${solved ? '✅' : ''}` } return output.resultBox(str) diff --git a/packages/ethernaut-zeronaut/src/tasks/get-level.js b/packages/ethernaut-zeronaut/src/tasks/get-level.js index d1b526f..14108e7 100644 --- a/packages/ethernaut-zeronaut/src/tasks/get-level.js +++ b/packages/ethernaut-zeronaut/src/tasks/get-level.js @@ -30,7 +30,6 @@ require('../scopes/zeronaut') const level = await getLevelContract(hre, levelAddress) // Query the level details - const levelName = await level.name() const levelInstructions = await level.instructions() // Check if the level is completed @@ -38,7 +37,7 @@ require('../scopes/zeronaut') // Display the level details let str = '' - str += ` name: ${hre.ethers.decodeBytes32String(levelName)}` + str += ` name: ${name}` str += `\n solved: ${solved}` str += `\n instructions: ${levelInstructions}`