Deploying to Testnet - Discussion

Welcome to the forum discussion for this section. Here you can ask questions or post feedback.

I get the error when request ether from faucet (

{“error”:"[ethjs-query] while formatting outputs from RPC ‘{“value”:{“message”:“Internal error”,“code”:-32603}}’"}


I found an alternative that works for me:


Hi Filip @filip ,
I had no problem deploying the contract, but when I tried to add “Bob”, the following error appeared:

I checked the cost is 100 wei and if I still try to do the transaction, it shows “invalid JSON RPC response”

Do you know how I can correct the error?
Thank you very much for your help!

Here is the error message:

I did make sure that the cost is 100 Wei:

Sorry for the slow response. Can you post your code for that function?

Hi Filip, thank you for your reply.
I tried again just now, I managed to deploy the contract successfully, but I was unable to create person, the same error message I posted above “Gas estimation failed” appreared.
The code is here:

import "./Ownable.sol";
import "./Destroyable.sol";
pragma solidity 0.5.12;

contract HelloWorld is Ownable, Destroyable{

    struct Person {
      uint id;
      string name;
      uint age;
      uint height;
      bool senior;
    //storage: things that are stored permanently, as long as the contract lives, e.g. owner, mapping
    //memory: things that are only saved during a function execution, (e.g. name argument in the function createPerson) other variables such as int, bool in function argument are by default in memory
    //stack: local variables of value types, normally less than 256 bits, e.g. uint, bool

    event personCreated(string name, bool senior);
    event personDeleted(string name, bool senior, address deletedBy);
    uint public balance;

    modifier costs(uint cost){
        require(msg.value >= cost);

    mapping (address => Person) private people;
    address[] private creators;
    function createPerson(string memory name, uint age, uint height) public payable costs(100 wei) {
      require(age < 150, "Age needs to be below 150");
      require(msg.value >= 1 ether);
      balance += msg.value; 
        //This creates a person
        Person memory newPerson; = name;
        newPerson.age = age;
        newPerson.height = height;

        if(age >= 65){
           newPerson.senior = true;
           newPerson.senior = false;

    function insertPerson(Person memory newPerson) private {
        address creator = msg.sender;
        people[creator] = newPerson;
        //compare the hash of people[msg.sender] == newPerson
        emit personCreated(, newPerson.senior);
    function getPerson() public view returns(string memory name, uint age, uint height, bool senior){
        address creator = msg.sender;
        return (people[creator].name, people[creator].age, people[creator].height, people[creator].senior);
    function deletePerson(address creator) public onlyOwner {
        string memory name = people[creator].name;
        bool senior = people[creator].senior;
        delete people[creator];
        assert(people[creator].age == 0);
        emit personDeleted(name, senior, owner);
   function getCreator(uint index) public view onlyOwner returns(address){
       return creators[index];
   function withdrawAll() public onlyOwner returns(uint){
       uint toTransfer = balance;
       balance = 0;
       msg.sender.transfer(toTransfer); //can use 'send' instead of 'transfer', but if transaction fails, 'send' will still reset balance to 0, wehreas 'transfer' can revert 
       return toTransfer;

1 Like

I can see the issue now. In the createPerson function, on the second line, you have:

  require(msg.value >= 1 ether);

So apart from your cost modifier, you have this require-statement as well, which requires 1 ether in order to continue. So the code always fails with 100 wei. Remove this and redeploy :slight_smile:


Thank you very much!
It works now!


When i go to, i get a new screen after a while with this message.


currently on mainnet - please select the correct test network

Switches to:

MetaMask Ether Faucet


address: 0x81b7e08f65bdf5648606c89998a9cc8164397647

balance: …

Can you help me out?

(Metamask installed and active)

1 Like

I used Brave. I switched to Crome and all works fine.

1 Like


I am able to execute the createPerson function with the contract deployed to the testnet. The transaction is successful however the Data is incorrect.

You need to switch the format in which you are viewing the data. You have them all selected to text, but all the event arguments are not strings. The name is a string so that will show correctly. But if you want to view a boolean for example, you need to set it to number and look if it 1 (true) or 0 (false).

The etherscan event viewer is pretty confusing and it can be hard to find the right parameters there. Did you send name and senior status in the event? If so I think you will find the senior bool in data field 4, from the top.

1 Like

@filip I’m sorry if this is the wrong thread to request this, but after completing this course, I haven’t received my certificate. Usually it comes in email immediately, but it’s been a day or two already. I also tried just going through each lesson and clicking Next Lesson over and over again, and it didn’t help. Thank you!

Sorry to hear that. Email if you haven’t already.

Hey, tried to fund my metamask with ether from, it connect properly, but it does not send when I do request 1 ether from the contract. I dont get any transaction detailes, just the option of donating left over of ethers. In the end I got the reply given below. am I the only one having this issue?

“Too many requests, please try again later.”

1 Like

Hey @Haug
Metamask faucet is a bit buggy, i ll recommend you to use this faucet instead :


@filip thanks for the amazing lessons.


MetaMask would not transfer the ETH account address or balance to the Remix. I was using Brave, then I tried in Chrome. Any ideas on why the account number and balance does not show in Remix after click Connect in MetaMask?