Solidity Basics

Thanks for the feedback!

1 Like

I finally made it over to the Ethereum Smart Contract Programming 101 course today! I’m super excited to jump into all the great material the Academy has provided. Have a great day!

1 Like

Great to have you here @scornkrypto! :smiley:

And great that you’re so pumped and ready to dive into Solidity :muscle:

Do check out other posts here in the forum if you’re not sure about something during the course and are looking for further clarification — you’ll find lots of further explanations here. But if you can’t find the answer you’re looking for then feel free to post your question and we’ll do our best to help you out! :slight_smile:

2 Likes

Thank you… Will do that i the future :smile: :

1 Like

Hello… I’m building off of the HelloWorld contract. I’m building a Web3.js interface. Now, I’m trying to call the withdrawAll() function back into my wallet. any tips or suggestions?

Solidity:

    function withdrawAll() public onlyOwner returns(uint) {
        uint toTransfer = balance;
        balance = 0;
        msg.sender.transfer(toTransfer);
        return toTransfer;
    }

Javascript:

document.getElementById('withdrawButton').addEventListener('click', () => {
     console.log('withdraw the funds !');
     myContract.methods.withdrawAll().call()
         .then(function (result) {
               console.log(result);
         });
});

Since you create a new thread for the same, answered to your question here.

Thanks

2 Likes

Hello Filip,
I am pumped!
Never thought I’d get this far.
Bring it on!
DOODESVILLE

P.S. When do I get to build my crypto? :slight_smile:

1 Like

Hi Filip, Just finished this lesson on smart contracts. It took me a few hours to digest and deploy, but I finally got everything to work just like in your tutorial. Whew! See you in the next one!

1 Like

Hello Filip,
I tried this and I got the remix dashboard.
Mostly it worked but there were no blue or yellow buttons.
So, there was no SET MESSAGE button.
No GET MESSAGE button,
and no MESSAGE button.
By the sound of things at the end of the video, this is an important feature.
Is there anything you could suggest that would be helpful?
DOODESVILLE

Did you compile and deploy the contract correctly? Can you post some screenshots where you got stuck? :slight_smile:

2 Likes

Hello Alko89,
When I go through to remix from the link on the course this message comes up.
Do you know what it means and how to fix it?

You are using an https connection. Please switch to http if you are using Remix against an http Web3 provider or allow Mixed Content in your browser.

ALSO, when I did the code, then compiled it, my metamask came alive and asked me for my pass phrase.

Next I will try to do screen shots. Have never done screen shots before - got any tips?

DOODESVILLE

This warning is not important for the purpose of the course since it doesn’t impact Javascript VM and most Web3 providers use https.

Hmm, Metamask might appear when you want to deploy the contract, not compile it. Are you on the right url? It should be https://remix.ethereum.org/
If you see the Metamask popup during deployment, then you’re probably using the wrong Environment, you must select Javascript VM from the dropdown:
image

If you’re using Firefox you just right click and select Take a Screenshot :slight_smile:

1 Like

Here are the screen shots .
That’s why I’m enjoying this - when I learn something new, it makes me feel smart :slight_smile:

So, have used right environment - no metamask this time.
But still no blue and yellow buttons - ‘message’, ‘get message’, or ‘set message’ - as you can see from the screen shots, they are not there - and the URL is the same.
Mystified!
DOODESVILLE

Have you deployed the contract? :stuck_out_tongue: You must click the orange Deploy button, once you deploy your contract they will appear :smiley:

1 Like

Yes I did that - will try again.
DOODESVILLE

Ok, let me know if it worked or if you receive any error. :slight_smile:

1 Like

Hello Alko89,
I have tried again.
The contract has deployed, but the problem is that the remix console extends downwards beyond the window of my screen - therefore I can’t see the buttons (or if they are there.)
How can I get the console to fit inside the screen window, or make the screen window bigger?
Basic problem, I realise, but honestly don’t know.
DOODESVILLE :laughing: :slight_smile: Slightly frustrating and depressing. I WANT to get on with it!

You can scroll through the windows. I tried making my window really small and was still able to get to the part where I can interact with the contract. :slight_smile:

1 Like

Hello Alko89,
I gave it a try, and was able to scroll down - progress!
Somehow, I lost my Javascript VM, so metamask got activated again.
So aborted the mission. will try again later.
Meanwhile I have another question:
When Filip is typing into the remix console some of the words come up in italics.
Is this important?
Is the console supposed to do it on it’s own, or am I somehow supposed to make the letters go italic?
I can’t seem to get the letters to go italic.
A detail, I know, but it’s all about detail in this space.
Have a great Monday.
DOODESVILLE :slight_smile:

Yaaaaaaaaaaaaaaaay!!!
I got it to work.
Scrolling down, pressing yellow and blue buttons, everything!
Thank you for your brilliant, patient support.
DOODESVILLE :slight_smile:

1 Like