Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when writing remix unit tests: URL not parseable: remix_accounts.sol

I'm writing unit test in remix-ide and I want to call functions from different addresses within a single test.

The remix-tests Github page says that you can use import "remix_accounts.sol";, but I get URL not parseable: remix_accounts.sol. How to fix that? Or maybe there's another way to call from various addresses?

like image 669
Arterm Avatar asked Apr 11 '19 14:04

Arterm


1 Answers

Import files with relative paths, in your case, modify the following

import "remix_accounts.sol";

to

import "./remix_accounts.sol";

Also, notice that remix doesn't allow import from an ancestor directory, for example:

import "../remix_accounts.sol";
like image 136
StillFantasy Avatar answered Oct 19 '22 04:10

StillFantasy