load_artifact (Func)¶
Load a portable ABI artifact from JSON.
Takes what CompiledContract.artifact_json returns, or what upstream
silverc -c writes. Compile once and ship the artifact; derive addresses
and build unlocking scripts from it at runtime with no source and no
compiler.
debug_call and compiling with different constructor arguments need the
source and are not available from an artifact — an artifact describes one
already-compiled contract.
| PARAMETER | DESCRIPTION |
|---|---|
json
|
The artifact JSON.
TYPE:
|
contract_name
|
Which contract to select. Omit for an artifact that
holds exactly one (what
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ContractArtifact
|
The loaded artifact.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
SilverScriptError
|
If the JSON is malformed, its schema version is
unsupported, or |
Note
Experimental. SilverScript and these bindings are under active development; the API and the artifact schema may change in breaking ways between releases.