Package org.stellar.sdk.contract
Class ContractInfo
java.lang.Object
org.stellar.sdk.contract.ContractInfo
Aggregates SEP-0046 contract metadata, SEP-0048 interface specification, and contract environment
metadata read from a single Wasm module.
-
Constructor Summary
ConstructorsConstructorDescriptionContractInfo(ContractMeta meta, ContractSpec spec) ContractInfo(ContractMeta meta, ContractSpec spec, List<SCEnvMetaEntry> envMeta) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ContractInfofromWasm(byte[] wasm) Creates aContractInfofrom contract Wasm bytes.static ContractInfofromWasmFile(Path path) Creates aContractInfofrom a contract Wasm file.getMeta()getSpec()inthashCode()toString()
-
Constructor Details
-
ContractInfo
-
ContractInfo
-
-
Method Details
-
fromWasm
Creates aContractInfofrom contract Wasm bytes. Scans the module once and readscontractmetav0,contractspecv0, andcontractenvmetav0sections.- Parameters:
wasm- contract Wasm bytes- Throws:
InvalidWasmException- if the Wasm module or any introspection section cannot be decoded, or if multiplecontractspecv0sections are present
-
fromWasmFile
Creates aContractInfofrom a contract Wasm file.- Parameters:
path- path to the contract Wasm file- Throws:
IOException- if the file cannot be readInvalidWasmException- if the Wasm module or any introspection section cannot be decoded
-
getMeta
-
getSpec
-
getEnvMeta
-
equals
-
hashCode
public int hashCode() -
toString
-