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,600 points
34 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
• 68,480 points

Related Questions In Blockchain

+1 vote
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,350 points
488 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,600 points
70 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 30 in Blockchain by Sourav kumar
242 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
138 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,810 points
188 views
0 votes
1 answer
+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,620 points
180 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
• 68,480 points
108 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 3, 2018 in Blockchain by Omkar
• 68,480 points
170 views