Skip to main content
fixed link
Source Link
Jeff Coleman
  • 22.2k
  • 18
  • 78
  • 91

No, you do not need to call the parent constructor yourself unless you need to pass arguments to it (detailed examples here).

As far as addresses go, the solidity file specified above is basically like a class specification. You will decide what actually gets an address at the time of instantiation. Most likely, when you instantiate contract B somehow, you will create only a single contract at a single address which contains the code for all inherited functionality. The only way you would have a separate address for A is if you also separately instantiated an entirely independent copy of A.

Alternatively, if you're referring to the "owner" address variable, it is already set in the base constructor and present in contract storage. You do not need to define the variable again: you can simply use it however you need to.

No, you do not need to call the parent constructor yourself unless you need to pass arguments to it (detailed examples here).

As far as addresses go, the solidity file specified above is basically like a class specification. You will decide what actually gets an address at the time of instantiation. Most likely, when you instantiate contract B somehow, you will create only a single contract at a single address which contains the code for all inherited functionality. The only way you would have a separate address for A is if you also separately instantiated an entirely independent copy of A.

No, you do not need to call the parent constructor yourself unless you need to pass arguments to it (detailed examples here).

As far as addresses go, the solidity file specified above is basically like a class specification. You will decide what actually gets an address at the time of instantiation. Most likely, when you instantiate contract B somehow, you will create only a single contract at a single address which contains the code for all inherited functionality. The only way you would have a separate address for A is if you also separately instantiated an entirely independent copy of A.

Alternatively, if you're referring to the "owner" address variable, it is already set in the base constructor and present in contract storage. You do not need to define the variable again: you can simply use it however you need to.

fixed link
Source Link
Jeff Coleman
  • 22.2k
  • 18
  • 78
  • 91

No, you do not need to call the parent constructor yourself unless you need to pass arguments to it (detailed examples [here] (http://solidity.readthedocs.io/en/develop/contracts.html#arguments-for-base-constructorshere)).

As far as addresses go, the solidity file specified above is basically like a class specification. You will decide what actually gets an address at the time of instantiation. Most likely, when you instantiate contract B somehow, you will create only a single contract at a single address which contains the code for all inherited functionality. The only way you would have a separate address for A is if you also separately instantiated an entirely independent copy of A.

No, you do not need to call the parent constructor yourself unless you need to pass arguments to it (detailed examples [here] (http://solidity.readthedocs.io/en/develop/contracts.html#arguments-for-base-constructors)).

As far as addresses go, the solidity file specified above is basically like a class specification. You will decide what actually gets an address at the time of instantiation. Most likely, when you instantiate contract B somehow, you will create only a single contract at a single address which contains the code for all inherited functionality. The only way you would have a separate address for A is if you also separately instantiated an entirely independent copy of A.

No, you do not need to call the parent constructor yourself unless you need to pass arguments to it (detailed examples here).

As far as addresses go, the solidity file specified above is basically like a class specification. You will decide what actually gets an address at the time of instantiation. Most likely, when you instantiate contract B somehow, you will create only a single contract at a single address which contains the code for all inherited functionality. The only way you would have a separate address for A is if you also separately instantiated an entirely independent copy of A.

Source Link
Jeff Coleman
  • 22.2k
  • 18
  • 78
  • 91

No, you do not need to call the parent constructor yourself unless you need to pass arguments to it (detailed examples [here] (http://solidity.readthedocs.io/en/develop/contracts.html#arguments-for-base-constructors)).

As far as addresses go, the solidity file specified above is basically like a class specification. You will decide what actually gets an address at the time of instantiation. Most likely, when you instantiate contract B somehow, you will create only a single contract at a single address which contains the code for all inherited functionality. The only way you would have a separate address for A is if you also separately instantiated an entirely independent copy of A.