0

i'm using the following way! but got error URL not parseable: Ownable.sol!!

import "github.com/OpenZeppelin/zeppelin-solidity/contracts/ownership/Ownable.sol";
1

You URL should start with 'http://' or 'https://' otherwise it's just a path. Also, OpenZeppelin renamed the repo 'zeppelin-solidity' to 'openzeppelin-solidity' a while ago.

Try this:

import "http://github.com/OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol";

-- update--

Be sure to check out the structure of the openzeppelin-solidity github repository. The StandardToken contract has also been moved and was renamed to ERC20.

Instead of

import "http://github.com/OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol"; 
import "http://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/StandardToken.sol";

use

import "http://github.com/OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol"; 
import "http://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
5
  • 1
    hello! @henk ! it works fine but when i import 2 urls then it gave error=> Unable to import "undefined": Not Found i'm using import "http://github.com/OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol"; import "http://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/StandardToken.sol"; – Sunanda Sharma Oct 4 '18 at 13:07
  • Updated my answer. Be sure to check out the structure of the openzeppelin-solidity github repository – Henk Oct 4 '18 at 14:40
  • Thanks!! @Henk! but problem remains the same!! – Sunanda Sharma Oct 5 '18 at 7:07
  • It's working perfectly in Remix. What editor are you using? Does it have an internet connection? – Henk Oct 5 '18 at 9:17
  • it shows me error undefined!! else everything works fine!! @Henk – Sunanda Sharma Oct 5 '18 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.