ethcontract-rs icon indicating copy to clipboard operation
ethcontract-rs copied to clipboard

Detect artifact formats automatically

Open taminomara opened this issue 3 years ago • 0 comments

We could detect format of JSON artifacts automatically by inspecting their contents and looking at presence of certain keys. We could also use artifact source, i.e. etherscan artifacts are always plain ABI.

Not sure if it should be a separate format with its own struct, settings etc., or just a function. If we go with a separate format, I'd think about ArtifactLoader trait.

Also we could implement AbiFormat for plain ABIs, and stop wrapping etherscan response into curly brackets.

taminomara avatar Jul 05 '21 14:07 taminomara