Enum ethers_contract_abigen::Source [−][src]
pub enum Source {
String(String),
Local(String),
Http(Url),
Etherscan(Address),
Polygonscan(Address),
Snowtrace(Address),
Npm(String),
}Expand description
A source of a Truffle artifact JSON.
Variants
String(String)A raw ABI string
Tuple Fields of String
0: StringLocal(String)An ABI located on the local file system.
Tuple Fields of Local
0: StringHttp(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: AddressPolygonscan(Address)An address of a mainnet contract that has been verified on Polygonscan.com.
Tuple Fields of Polygonscan
0: AddressSnowtrace(Address)An address of a mainnet contract that has been verified on snowtrace.io.
Tuple Fields of Snowtrace
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.
Creates a local filesystem source from a path string.
Creates an Etherscan source from an address string.
Creates an Polygonscan source from an address string.
Creates an Snowtrace source from an address string.
Creates an Etherscan source from an address string.
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.
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more