I have three smart contracts say a.sol, b.sol and c.sol... Out of these three, first two are independent smart contracts whereas c.sol uses the functions of a.sol and b.sol and thus c.sol requires to "import" the first two smart contracts. "Import" works locally but how to deploy all of them via remix/truffle on testnet such that c.sol can still access the functions of a.sol and b.sol?
Does your contract a and b supposed to be standalone contracts that will be used regardless of contract c? ie: user store data in contract a, which will be used by contract c
If so, then you can have contract a and b as variables of contract c like this
a.sol
contract A {
function doSomething() {
...
}
}
c.sol
contract C {
A a;
function setA(address addressOfContractA) {
a = A(address);
}
function makeADoSomething() {
a.doSomething();
}
}