I'm deploying two contracts, one of which depends on another, plus they depend on a number of other contracts via the import statements. However, although in my deployment script I haven't included any link
statements, all my tests pass.
Why does it work without linking, and should I add the link statements before deploying to a live net?
Here's what I have in my .sol file:
pragma solidity ^0.4.18;
import '../node_modules/zeppelin-solidity/contracts/token/StandardToken.sol';
import '../node_modules/zeppelin-solidity/contracts/math/Math.sol';
import '../node_modules/zeppelin-solidity/contracts/math/SafeMath.sol';
import '../node_modules/zeppelin-solidity/contracts/ownership/Ownable.sol';
contract NppToken is StandardToken, Ownable {...}
contract CrowdSale is Ownable {
NppToken private token;
...
}
Here's my migrations file:
var NppToken = artifacts.require("./NppToken.sol");
var CrowdSale = artifacts.require("./CrowdSale.sol");
module.exports = function(deployer, network, accounts) {
deployer.deploy(NppToken);
deployer.deploy(CrowdSale, NppToken.address);
};