Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

142
Views
La terminal se atasca en 'Esperando transacción en el mempool' mientras usa la función de implementación de Brownie

Cuando ejecuto brownie run scripts/deploy.py, la terminal imprime 'Esperando en el mempool' infinitamente. Mi contrato inteligente no tiene 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()

Una terminal está ejecutando "npm run ganache" y aquí está mi archivo package.json,

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

La terminal 2 está ejecutando brownie run scripts/deploy.py Cuando elimino esta terminal, aparece el siguiente mensaje:

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

Aquí está el video de Youtube que estoy siguiendo si es útil 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 answers
Answer question

0

Estoy siguiendo ese mismo curso y enfrenté el mismo problema.
Funcionó después de agregar ganache-local como red para brownie, como se hizo más adelante en el video que vinculó. https://youtu.be/M576WGiDBdQ?t=20295 (5:38:15)

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

En cuanto a la advertencia, puede ignorarla con seguridad. Solo te dice que la cadena de bloques de ganache que estás ejecutando tiene una altura de bloque de x.

about 4 years ago · Juan Pablo Isaza Report

0

La función de retrieve parece correcta, pero hay un error en addPerson . No estoy seguro de si esto lo resolverá, pero está empujando el tipo de People a las people pero las people no están definidas:

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

ya que tiene método push , debe ser una matriz definida así:

 People[] public people;
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!