Inheritance Reading Assignment

1. What is the base contract? It is the parent contract from which other contracts/objects inherit from it.

2. Which functions are available for derived contracts? All public and internally scoped functions (incl events, modifiers, functions, variables) and state variables are inherited to and available to the child contracts.

3. What is hierarchical inheritance? A parent contract acts as the base for more than 1 child contract.

1 Like
  1. The base contract (parent) is the contract from which another contract has been derived (child).
  2. Public, internal, external(? unsure about external).
  3. When a contract is the parent of multiple contracts.
1 Like

1. What is the base contract?
The base contract is the parent contract. The contract which is inherited
2. Which functions are available for derived contracts?
All public and internal scoped functions and state variables are available to derived contracts
3. What is hierarchical inheritance?
when a single parent contract acts as base contract for multiple derived contracts.

1 Like
  1. What is a base contract?

The base contract is the parent in the parent-child relationship between two contracts using inheritance.

  1. Which functions are available for derived contracts?

All public and internal scoped functions and state variables are available to derived contracts.

  1. What is hierarchical inheritance?

Hierarchical inheritance is where a base contract has multiple derived contracts, which themselves can have further levels of derived contracts.

1 Like
  1. The parent contract. It is the contract that gets inherited into another contract. Its code gets absorbed by the child contract.

  2. Public and internal.

  3. It is when a parent (base) contract can have multiple children.

1 Like
  1. A base contract also known as a the parent contract is the code being inherited by other contracts for information.
  2. Functions that are from the inherited contract all the way up to the last base contract if it is Multi Level Inheritance.
  3. When a single contract acts as a base contract to multiple derived ones.
1 Like
  1. A base contract , or so called parent contract, inherited to its child contract, which reuses inherited functionalities from the base contract.

  2. All public and internal scoped functions, modifiers, events and state variables are available to derived contracts.

  3. Hierarchical inheritance is when one single contract acts as base contract for multiple derived contracts.

1 Like
  1. The parent contract is base contract to the child contract.
  2. All public and internal scoped functions and state variables are available to derived contracts.
  3. A hierarchal inheritance is like a multi-level inheritance, however, one contract has multiple child contracts inside of it.
1 Like

1. What is the base contract?
Base contracts are what child contracts are derived from.

2. Which functions are available for derived contracts?
Pure and Public functions.

3. What is hierarchical inheritance?
A single contract that acts a base contract for multiple derived contracts.

1 Like

1. What is the base contract?
The base contract is the parent contract.

2. Which functions are available for derived contracts?
All public and internal scoped contracts.

3. What is hierarchical inheritance?
Hierarchical inheritance is where a single contract acts as a base contract for multiple derived contracts.

1 Like
  1. It is the Base contract.
  2. The public and internal functions
  3. A base contract that has multiple child contracts.
1 Like
  1. Base contracts are the initial parent contracts that are inherited by its derived (child) contracts

  2. Public and internal scoped contracts, as well as state variables, modifiers and events.

  3. A single contract acts as a base contracts for multiple derived contracts.

1 Like
  1. Is the parent -base contract
    2.all the public and internals functions
    3.a single contract could act as a base contract for multiple child contracts
1 Like
  1. The base contract is the parent contract.
  2. Derived contracts can inherit functions, variables, events, modifiers form the parent contract.
  3. A single contract acts like a base contract for multiple dervied contracts.
1 Like
  1. A base contract is the parent contract to a derived contract.
  2. The functions of the parent contract and the derived contract are both available.
  3. Hierarchical inheritance is when more than one derived contract uses the same contract as the base contract.
1 Like
  1. What is the base contract?
    The contract from which all others are derived
  2. Which functions are available for derived contracts?
    Whichever keywords we specify in the function header like public or private can modify which functions are available. Public functions internal functions and state variables are derived.
  3. What is hierarchical inheritance?
    When there are two or more sub contracts which share the same base contract
1 Like
  1. Base contract is the “parent” contract : child contract will be based on the “base” contract and will inherits everything from this one.

  2. Every public and internal functions are available to the child/derived contract.

  3. It is the concept of deriving a parent contract into multiple child contracts that are not linked together in any ways.

2 Likes

1.what is the base contract?
this is the parent contract a.k.a the derived class. this is a contract from where most of the other child contracts are derived from.

2.Which functions are available for derived contracts?
These are all the public functions and functions that are in the parent contract. This also includes the state variables and modifiers of this parent contract

3.what is hierarchical inheritance?
this is a contract that is a parent of multiple child contracts.

1 Like
  • What is the base contract?
    • The contract which is inherited by child contracts; the “parent” contract
  • Which functions are available for derived contracts?
    • All public and internal scoped functions. (I’ll be honest I’m not entirely sure what the latter means, but I suspect Filip will clarify in the next few videos.)
  • What is hierarchical inheritance?
    • Multiple child contracts (B & C) deriving from the same base contract (A), exempli gratia:
contract A { ... }
contract B is A { ... }
contract C is A { ... }
2 Likes
  1. The base contract is known as the parent contract, it’s the contract from where the other contracts will be derived.
  2. All public and internal scoped functions and state variables are available to derived contracts.
  3. An hierarchical contract is a single contract acts as a base contract for multiple derived contracts.
2 Likes