Search code examples
deploymentethereumsoliditysmartcontracts

How to deploy two smart contracts that inherit from each other to test network together?


I have two smarts contracts

I working in remix IDE and when I click "Deploy", I can deploy only one smart contract. And when I copy ABI, I can copy only one ABI from one contract.

Is there a way to deploy this two contracts together, or should I deploy them seperatly? And if I will deploy them seperatly how numberTwo contract will find where is numberOne contract?

Thank you.

pragma solidity ^0.4.25;
contract numberOne{
}
contract numberTwo is numberOne{
}

Solution

  • I just made it. If simply deploy numberTwo contract that inherit from numberOne contract first, it will automaticly deploy two contracts. And if I will copy numberTwo contract's ABI it will have ABI from numberOne contract as well.