java.lang.Object
java.lang.Record
tech.deplant.java4ever.framework.LocalConfig
public record LocalConfig(Artifact<String,String> artifact, LocalConfig.LocalInfo info)
extends Record
The type Local config.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionLocalConfig
(Artifact<String, String> artifact, LocalConfig.LocalInfo info) Creates an instance of aLocalConfig
record class. -
Method Summary
Modifier and TypeMethodDescriptionAbi contract abi.void
addAbiPath
(String name, String pathStr) Add abi path.void
addKeypairPath
(String name, String pathStr) Add keypair path.void
addTvcPath
(String name, String pathStr) Add tvc path.artifact()
Returns the value of theartifact
record component.compileTemplate
(String filename, String contractName) Compile template template.compileTemplate
(String sourcePath, String buildPath, String filename, String contractName, String libsPath) Compile template template.credentials
(String name) Credentials credentials.static LocalConfig
EMPTY
(String serializationPath, String solcPath, String linkerPath, String stdLibPath, String sourcePath, String buildPath) Empty local config.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.info()
Returns the value of theinfo
record component.static LocalConfig
Load local config.void
sync()
Sync.final String
toString()
Returns a string representation of this record class.Tvc tvc.
-
Constructor Details
-
LocalConfig
Creates an instance of aLocalConfig
record class.- Parameters:
artifact
- the value for theartifact
record componentinfo
- the value for theinfo
record component
-
-
Method Details
-
EMPTY
public static LocalConfig EMPTY(String serializationPath, String solcPath, String linkerPath, String stdLibPath, String sourcePath, String buildPath) throws IOException Empty local config.- Parameters:
serializationPath
- the serialization pathsolcPath
- the solc pathlinkerPath
- the linker pathstdLibPath
- the std lib pathsourcePath
- the source pathbuildPath
- the build path- Returns:
- the local config
- Throws:
IOException
- the io exception
-
LOAD
public static LocalConfig LOAD(String serializationPath) throws com.fasterxml.jackson.core.JsonProcessingException Load local config.- Parameters:
serializationPath
- the serialization path- Returns:
- the local config
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exception
-
compileTemplate
public Template compileTemplate(String filename, String contractName) throws com.fasterxml.jackson.core.JsonProcessingException, tech.deplant.java4ever.binding.EverSdkException Compile template template.- Parameters:
filename
- the filenamecontractName
- the contract name- Returns:
- the template
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exceptiontech.deplant.java4ever.binding.EverSdkException
- the ever sdk exception
-
compileTemplate
public Template compileTemplate(String sourcePath, String buildPath, String filename, String contractName, String libsPath) throws com.fasterxml.jackson.core.JsonProcessingException, tech.deplant.java4ever.binding.EverSdkException Compile template template.- Parameters:
sourcePath
- the source pathbuildPath
- the build pathfilename
- the filenamecontractName
- the contract namelibsPath
- the libs path- Returns:
- the template
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exceptiontech.deplant.java4ever.binding.EverSdkException
- the ever sdk exception
-
abi
Abi contract abi.- Parameters:
name
- the name- Returns:
- the contract abi
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exception
-
credentials
public Credentials credentials(String name) throws com.fasterxml.jackson.core.JsonProcessingException Credentials credentials.- Parameters:
name
- the name- Returns:
- the credentials
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exception
-
tvc
-
addAbiPath
Add abi path.- Parameters:
name
- the namepathStr
- the path str- Throws:
IOException
- the io exception
-
addTvcPath
Add tvc path.- Parameters:
name
- the namepathStr
- the path str- Throws:
IOException
- the io exception
-
addKeypairPath
Add keypair path.- Parameters:
name
- the namepathStr
- the path str- Throws:
IOException
- the io exception
-
sync
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
artifact
-
info
Returns the value of theinfo
record component.- Returns:
- the value of the
info
record component
-