New answers tagged

1

When you compile a contract that calls external library functions, the compiler embeds the address of the library (or a placeholder for such an address) in its bytecode. It works this way no matter if you compile the contract and the library together. Linking to an already deployed library is actually the usual situation that any tool has to handle. If you ...


2

I think you could use web3 to link the contract to be deployed to the library that is already deployed, as the following StackExchange answer suggests. code: const ConvertLib = artifacts.require("ConvertLib"); const MetaCoin = artifacts.require("MetaCoin"); module.exports = function(deployer) { ConvertLib.address = "0xabce987676......


Top 50 recent answers are included