What is the difference between creating a new solidity contract with and without the new keyword

0 votes
What is the use of the new keyword for creating new smart contracts. Why not just omit this keyword?
Oct 8, 2018 in Blockchain by digger
• 26,740 points
1,170 views

1 answer to this question.

0 votes
You cannot omit new keyword for creating new contracts.

In the case of: token = new Token;

a new contrast is created and the address passed to token.

In the case of: token = existingToken;

existingToken has to be an existing contract (already created) and token will be passed the current address of existingToken.
answered Oct 8, 2018 by Omkar
• 69,220 points

Related Questions In Blockchain

0 votes
1 answer

What is the difference between if() and require() statement in solidity??

If() and require() have separate functions and ...READ MORE

answered Apr 18, 2018 in Blockchain by Shashank
• 10,400 points
5,052 views
0 votes
1 answer

Solidity difference array with and without new keyword.

Creating arrays with variable length in memory ...READ MORE

answered Aug 16, 2018 in Blockchain by digger
• 26,740 points
1,646 views
0 votes
2 answers

What is the difference between full node and partial node?

We need different types of nodes to ...READ MORE

answered May 31, 2019 in Blockchain by Sourav kumar
5,790 views
0 votes
1 answer

What is the difference between Blockchin and Bitcoin

Blockchain has potential beyond Bitcoin and cryptocurrency. ...READ MORE

answered Jul 13, 2018 in Blockchain by shweta
• 440 points
2,102 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,922 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points
1,410 views
+3 votes
1 answer

What is the difference between online and offline hyperledger composer?

Hey @Renu353! Well, it's good that you ...READ MORE

answered Sep 21, 2018 in Blockchain by Omkar
• 69,220 points
906 views
0 votes
1 answer

What is the difference between hashing and encryption process?

Hashing and encryption are same but not ...READ MORE

answered Dec 4, 2018 in Blockchain by Omkar
• 69,220 points
1,784 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP