I am trying to interact with a solidity library without using its source code. The library is located at address 0xc0b843678E1E73c090De725Ee1Af6a9F728E2C47 on the rospten network. What I have attempted is to create an 'abstract contract' which I call at the libraries address however I obtain an error. See below:My error. Here is how I have tried to implement the library as an abstract contract. Abstract contract. And here is how I have called it and attempted to use a function from the library in my contract 'token'. See lines 19 and 20. See where I attempt to call the libraries 'customSend' function
Asked
Active
Viewed 437 times
2 Answers
1
It is not possible. For a smart contract to call a function from another smart contract, you need the source code and the address of the deployed contract. When you create an instance of the library, imagine it as a car. To make an instance of that car you need the entire diagram of how the car will be like, and what the car will be able to do. That would be the source code in this case. Although you create an instance pointing to a certain address (where your actual desired smart contract is) you need to give solidity the context of that smart contract and what it can do. So you will need the source code to be able to interact with that smart contract.
Hope you find this information useful :)

NuMa
- 588
- 2
- 7