Enum ethers_contract_abigen::Source [−][src]
Expand description
A source of a Truffle artifact JSON.
Variants
String(String)A raw ABI string
Tuple Fields of String
0: StringLocal(PathBuf)An ABI located on the local file system.
Tuple Fields of Local
0: PathBufHttp(Url)An ABI to be retrieved over HTTP(S).
Tuple Fields of Http
0: UrlEtherscan(Address)An address of a mainnet contract that has been verified on Etherscan.io.
Tuple Fields of Etherscan
0: AddressNpm(String)The package identifier of an npm package with a path to a Truffle
artifact or ABI to be retrieved from unpkg.io.
Tuple Fields of Npm
0: StringImplementations
Parses an ABI from a source
Contract ABIs can be retrieved from the local filesystem or online
from etherscan.io. They can also be provided in-line. This method parses
ABI source URLs and accepts the following:
-
raw ABI JSON
-
relative/path/to/Contract.json: a relative path to an ABI JSON file. This relative path is rooted in the current working directory. To specify the root for relative paths, useSource::with_root. -
/absolute/path/to/Contract.jsonorfile:///absolute/path/to/Contract.json: an absolute path or file URL to an ABI JSON file. -
http(s)://...an HTTP url to a contract ABI. -
etherscan:0xXX..XXorhttps://etherscan.io/address/0xXX..XX: a address or URL of a verified contract on Etherscan. -
npm:@org/package@1.0.0/path/to/contract.jsonan npmjs package with an optional version and path (defaulting to the latest version andindex.js). The contract ABI will be retrieved throughunpkg.io.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Source
impl UnwindSafe for Source
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more