current position:Home>Remix deployment contract failed

Remix deployment contract failed

2022-02-03 20:53:51 Q & A of Denglian community

This is my private chain start command

geth --rpc --rpcport "7545" --rpcaddr "" --rpccorsdomain="*" --rpcapi eth,web3,admin,personal,net --datadir data --port "30303" --nodiscover --networkid 1024 --allow-insecure-unlock console 2>>geth.log

This is my solidity Code

pragma solidity ^0.6.0;// pragma experimental ABIEncoderV2;contract noteContract {    struct Note {        string title;        string outline;        string time;        string content;    }    mapping(address => Note[]) public notes;    constructor() public {}    // event NewNote(address indexed sender, Note indexed note);    //  Add notes     function addNote(string memory title,string memory outline,string memory time,string memory content) public {        notes[msg.sender].push(Note(title,outline,time,content));        // emit NewNote(msg.sender, note);    }    function getNotesLen() public view returns (uint256) {        return notes[msg.sender].length;    }    // event ModifyNote(address, uint256 index);    function modifyNote(uint256 index, string memory title,string memory outline,string memory time,string memory content) public {        notes[msg.sender][index] = Note(title,outline,time,content);        // emit ModifyNote(own, index);    }}

This is a remix Figure displayed by deployment , Has been pendingimage.png

This is a metamask,image.png

This is part of the log

INFO [02-25|13:49:30.391] Successfully sealed new block            number=1350 sealhash=7c77ef…a05658 hash=c97eb7…d82c77 elapsed=1.869sINFO [02-25|13:49:30.391] ?? block reached canonical chain          number=1343 hash=5cbb83…386476INFO [02-25|13:49:30.391] ?? mined potential block                  number=1350 hash=c97eb7…d82c77INFO [02-25|13:49:30.392] Commit new mining work                   number=1351 sealhash=f2772c…005703 uncles=0 txs=0 gas=0 fees=0 elapsed=192.646?sWARN [02-25|13:49:31.526] Served eth_sendRawTransaction            conn= reqid=7583936460024 t=365.153?s   err="replacement transaction underpriced"WARN [02-25|13:49:31.703] Served eth_sendRawTransaction            conn= reqid=7583936460025 t=21.711381ms err="replacement transaction underpriced"WARN [02-25|13:49:31.967] Served eth_sendRawTransaction            conn= reqid=7583936460026 t=88.965?s    err="known transaction: d48401ae362d66c923896aa52b33749f7f78ab495ee0bb41e5b29e276651e24d"WARN [02-25|13:49:32.453] Served eth_sendRawTransaction            conn= reqid=7583936460028 t=170.091?s   err="known transaction: 2aa6018329d07f82546589930a58df83921062059836feaec7a39d2629ae5593"WARN [02-25|13:49:32.835] Served eth_sendRawTransaction            conn= reqid=7583936460029 t=211.922?s   err="known transaction: 835e9a425c977c153b67b1fe5f1f6e854a2f680a12785bf080b922468aa1d69b"WARN [02-25|13:49:33.114] Served eth_sendRawTransaction            conn= reqid=7583936460027 t=176.381?s   err="known transaction: fc61d028b1744c38db54ee732f21ee5acdf26078944654b7f61ca3ac02fed0d7"INFO [02-25|13:49:35.192] Successfully sealed new block            number=1351 sealhash=f2772c…005703 hash=bd0eaf…f05235 elapsed=4.800sINFO [02-25|13:49:35.192] ?? block reached canonical chain          number=1344 hash=83a03a…c72fabINFO [02-25|13:49:35.192] ?? mined potential block                  number=1351 hash=bd0eaf…f05235INFO [02-25|13:49:35.193] Commit new mining work                   number=1352 sealhash=fb6108…a1d898 uncles=0 txs=0 gas=0 fees=0 elapsed=146.75?s

Tried to check the firewall , Not open , How to solve this problem

Take the answer 1:

I've had this problem before , Then a mess is over .geth There has always been a problem , stay --dev It's true that sometimes transactions get stuck in mode .

You can try :

  1. MetaMask When creating a new network , chainid and Private chain Keep consistent .
  2. restart geth
  3. stay geth console See if you can launch a deal
  4. Reset Metamask account number , Set up -》 senior -》 Reset account .

Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.

Random recommended