Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

559
Visualizações
Error de prueba de UNIT: No se implementó ningún contrato con el nombre Raffle

Esta es la sección de pruebas de mi unidad... He estado trabajando en este problema durante las últimas horas. Sin embargo, no pude... Creo que el error está en const { deployer } = await getNamedAccounts() esta línea. El contrato de rifa no se reconoce... (Nota: todas las implementaciones funcionan correctamente...)

 !developmentChains.includes(network.name) ? describe.skip() : describe("Raffle UNIT test", async () => { let raffle, vrfCoordinatorV2Mock const chainId = network.config.chainId beforeEach(async () => { const { deployer } = await getNamedAccounts() await deployments.fixture(["all"]) raffle = await ethers.getContract("Raffle", deployer) vrfCoordinatorV2Mock = await ethers.getContract("VRFCoordinatorV2Mock", deployer) }) describe("Constructor function", async () => { it("Initializes the raffle correctly.", async () => { const raffleState = await raffle.getRaffleState() const interval = await raffle.getInterval() assert.equal(raffleState.toString(), "0") assert.equal(interval.toString(), networkConfig[chainId]["interval"]) }) }) })

ERROR que tengo...

 ~/b/JSweb3_2/smart-contract_lottery  on main !2  hh test  ✔  took 5s  system   at 07:27:25 am Raffle UNIT test Constructor function Development chain detected! Deploying mocks Mocks deployed!!!... ---------------------!--!--!--------------------- 1) "before each" hook for "Initializes the raffle correctly." 0 passing (428ms) 1 failing 1) Raffle UNIT test "before each" hook for "Initializes the raffle correctly.": Error: No Contract deployed with name Raffle at Object.getContract (node_modules/@nomiclabs/hardhat-ethers/src/internal/helpers.ts:447:11) at processTicksAndRejections (node:internal/process/task_queues:96:5) at runNextTicks (node:internal/process/task_queues:65:3) at listOnTimeout (node:internal/timers:528:9) at processTimers (node:internal/timers:502:7) at Context.<anonymous> (test/unit/Raffle.test.js:16:24)

ESTOY SIGUIENDO UN TUTO DE ACORDAMIENTO.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda