Call the constructor in Solidity

Thanks to grandzero !


Aim : Call constructor from outside and inside

We deploy C1 contract with “10”

This is result. We called the constructor from outside.

We deploy C2 contract with “15”

Clicking the newContract button and take the address

You paste this address to the “At Address” section, choose C1 contract and enter 20 value. Deploy it.

Now we have new contract



Solidity Programming Language

Solidity basics for beginners: Learn the fundamentals of smart contract development and build your first DApp! #Solidity #Foundry #Ethereum #Opcodes #DApps