Suppose I have a contract that uses a library, which has already been deployed to the blockchain at a certain address. Is there a way to reference that deployed library in the contract similar to referencing deployed contracts via interfaces?
Say I have the following code in solidity:
pragma solidity ^0.7.6;
import "./Library.sol";
contract A {
using Library for uint256;
constructor (){
uint256 a = 1;
uint256 b = a.increment();
}
}
and a library in the same directory with the filename "Library.sol" that contains the following lines of code:
pragma solidity ^0.7.6;
library Library {
function increment(uint256 x) {
return x + 1;
}
}
Is there a way to reference the library of type Library that was deployed at a particular address?