Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

148
Vistas
Terminal getting stuck at 'Awaiting transaction in the mempool' while using Brownie deploy function

When I run brownie run scripts/deploy.py, the terminal prints 'Awaiting in the mempool' infinitely. My smart contract has no constructor.

from brownie import accounts, config, SimpleStorage

def deploy_simple_storage():
    account = accounts[0]
    print(account)

    simple_storage = SimpleStorage.deploy({'from': account})
    stored_value = simple_storage.retrieve()
    print(stored_value)


def main():
    deploy_simple_storage()

One terminal is running "npm run ganache" and here's my package.json file,

{
  "dependencies": {
    "ganache": "^7.0.3",
    "ganache-cli": "^6.12.2"
  },
  "scripts": {
    "ganache": "ganache --wallet.seed myCustomSeed"
  }
}

Terminal 2 is running brownie run scripts/deploy.py When I kill this terminal, I get the following message,

raise TransactionNotFound(message)  
web3.exceptions.TransactionNotFound: Transaction with hash: '0x28da598c177dba438a6d8dee44ef3737ee1141d9435c00a42cd7ca481a58f99b' not found.

Here's the Youtube video that I am following if it's helpful https://www.youtube.com/watch?v=M576WGiDBdQ&t=16421s @4:43:48

SmartStorage.sol:

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

contract SimpleStorage {
    uint256 favoriteNumber;

    struct People {
        uint256 favoriteNumber;
        string name;
    }

    mapping(string => uint256) public nameToFavoriteNumber;

    function store(uint256 _favoriteNumber) public {
        favoriteNumber = _favoriteNumber;
    }

    function retrieve() public view returns(uint256) {
        return favoriteNumber;
    }

    function addPerson(string memory _name, uint256 _favoriteNumber) public {
        people.push(People(_favoriteNumber, _name));
        nameToFavoriteNumber[_name] = _favoriteNumber;
    }
}
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

I'm following that same course and faced the same issue.
It worked after adding ganache-local as a network for brownie, as done later in the video you linked. https://youtu.be/M576WGiDBdQ?t=20295 (5:38:15)

brownie networks add Ethereum ganache-local host=http://127.0.0.1:8545 chainid=1337

As for the warning, you can safely ignore it. It's just telling you that the ganache blockchain you're running has a block height of x.

about 4 years ago · Juan Pablo Isaza Denunciar

0

retrieve function seems correct but there is a bug in addPerson. I am not sure if this will solve it but you are pushing People type to people but people is not defined:

function addPerson(string memory _name, uint256 _favoriteNumber) public {
        // people is not defined
        people.push(People(_favoriteNumber, _name));
        nameToFavoriteNumber[_name] = _favoriteNumber;
    }

since it has push method, it must be an array defined like this:

    People[] public people;
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda