Share:
Notifications
Clear all

Earn While Learning Web3 Programming>> Start Here FREE!!!

[Solved] Smart Contract Development With Solidity For Beginners

23 Posts
4 Users
9 Reactions
819 Views
1
Topic starter

All discussion about our FREE Smart Contract Development With Solidity For Beginners Course goes here:

Do you have suggestions for improving the course, constructive criticism, additions and more to this course then reply below.

NOTE:

This Is An Exercise From Our FREE Smart Contract Development With Solidity For Beginners Course (If you have not enrolled yet, you can join the course totally for FREE).

 

User Avatar Oyewale khaleed 24/01/2024 8:59 pm

@foskaay One of the differences between javascript and solidity is that javascript can run on web browser but solidity cannot

8 Answers
1
Topic starter

I will be available and expect more students responses over here

User Avatar Oyewale khaleed 24/01/2024 1:03 pm

@foskaay Okay sie, thanks for the briefing

User Avatar Oyewale khaleed 24/01/2024 8:03 pm

@foskaay

// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

contract Howsolidityiswritten{

    function HelloWeb3World ()public pure returns(string memory){
        return "Hello Web3 World";
    }
} One of the issues i encountered was not setting the version to 0.8.7 as it was 0.8.22 on the compiler system.Then also it requested we use "pure" instead of "view" in the line of code called out. In general it was a good experience, Kudos to Sir Solomon
2
Topic starter

advance solidity courses coming this year - watchout all

1

1.What Is The Name Of Solidity Smart Contract Programming Used In This Course?

in the quiz .

the answer i chose is  REMIX  I WAS TOLD THAT THE ANSWER IS WRONG

Solomon Foskaay Solomon Foskaay Topic starter 28/10/2021 5:35 am

@leouloko i will check to see what is wrong with the quiz and fix if need be. Thanks for notifying me

User Avatar Alechenu Uloko 28/10/2021 5:53 am

Ok sir thank you very much

Solomon Foskaay Solomon Foskaay Topic starter 28/10/2021 8:15 am

@leouloko this is now fixed.

 

For finding the bug and reporting it first, you just earned yourself Bug bounty of 1,000PFAQ.

 

Check the Earnings Page for your current balance.

 

CONGRATS!

1

Thank you very much sir I am very happy to be part of this sir

Solomon Foskaay Solomon Foskaay Topic starter 28/10/2021 8:28 am

@leouloko indeed you are earlier and hope you stick around well enough to be part of the great things ahead on this platform. Meanwhile, help share your experience so far on your social media etc to make more programmers or programmers to-be discover our free helpful resources.

 

Also, follow our official Twitter dProgrammingUniversity handle to retweet our tweets as more info about the free courses will start getting pushed out from today on social media

1

contract howslidityiswriten{
function helloweb3world() public view returns(string memory){

if(4-6 == 4) {
return helloweb3world;
}
else {
return alechenu is now a developer;
}

}
}

please i hve been getting error please help

Solomon Foskaay Solomon Foskaay Topic starter 05/11/2021 8:50 pm

@leouloko try to always add the precise error you are getting so it easier to help out...

Meanwhile, just glanced through your code, I instantly spotted a serious error and have help rewrite the code below with explanation of the error i spotted personally. If that does not fix it then do let me know with precise error message along with the code

Solomon Foskaay Solomon Foskaay Topic starter 05/11/2021 8:57 pm

@leouloko

Your code

 

 

contract howslidityiswriten{
function helloweb3world() public view returns(string memory){

if(4-6 == 4) {
return helloweb3world;
}
else {
return alechenu is now a developer;
}

}
}

 

Rewriting for you below

 

contract howSolidityIsWriten{

function helloWeb3World() public pure returns(string memory){

if(4-6 == 4) {
return "Hello Web3 World" ;
}
else {
return "Alechenu is now a Developer" ;
}

}
}

 

Try run above. 

 

Solomon Foskaay Solomon Foskaay Topic starter 05/11/2021 9:06 pm

@leouloko now time to point out the errors.

 

The most glaring that will never allow the Smart Contract to compile nor deploy at all is the you forgot to add quote signs to the string. 

 

Go back and rewatch the course video about intro to variable data types. 

 

Whenever you declare a string it must be in a single or double quote and only number does not require quotes

 

Example:

 

string number = 1; //error

 

string number = "1"; //correct 

 

string number = "one" ; //correct

 

uint number = "1"; //error 

 

uint number = 1; //correct

 

int number = -1; //correct

 

 

Others is just make your code cleaner and readable by using camel cases etc.... 

1

my remix is saying spdx identifier not provided in source file. Before publishing consider adding a comment containing project removed link Sol.

this is the error i am getting

Solomon Foskaay Solomon Foskaay Topic starter 29/11/2021 7:53 am

@leouloko simply ignore the spdx licensing error for now but if ready to go into production then you can use the license that fit your smart contract source code use case if it is open source like MIT or not

Solomon Foskaay Solomon Foskaay Topic starter 29/11/2021 7:56 am

@leouloko Also for the screenshot you sent via live chat have you figured out the error already

I notice you have this line in the screenshot:

pragama solidity 0.8.7;

 

 the error is typo error, it should be:

pragma solidity 0.8.7;

//the error was "a" before "m" in the pragma which you wrote as pragama

 

hope that helps

 

Solomon Foskaay Solomon Foskaay Topic starter 29/11/2021 8:45 am

@leouloko you can use the following for the license for demo use only not for production contract:

 

 

// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
 
 
.
1
Topic starter

@leouloko ; @joshua And All

Happy Holiday and hope you guys are taking advantage of the prelaunch discount to mint your Membership ID NFT?

Without it, you won't be able to access free courses on this platform again from 1st January 2022

If not check my recent mail in your inbox for how to mint at discount before the new year at dProgrammingUniversity.com

 

 

0

Optimistic Ethereum

Share: