Module ethers_solc::utils [−][src]
Expand description
Utility functions
Statics
A regex that matches the import path and identifier of a solidity import statement with the named groups “path”, “id”.
A regex that matches the version part of a solidity pragma
as follows: pragma solidity ^0.5.2;
=> ^0.5.2
statement with the named groups “path”, “id”.
Functions
Returns all path parts from any solidity import statement in a string,
import "./contracts/Contract.sol";
-> "./contracts/Contract.sol"
.
Returns the solidity version pragma from the given input:
pragma solidity ^0.5.2;
=> ^0.5.2
Attempts to determine if the given source is a local, relative import
Returns the path to the library if the source path is in fact determined to be a library path, and it exists.
Returns a list of absolute paths to all the solidity files under the root
Returns the source name for the given source path, the ancestors of the root path
/Users/project/sources/contract.sol
-> sources/contracts.sol