All Downloads are FREE. Search and download functionalities are using the official Maven repository.

core.src.api.ContractLifecycle.mustache Maven / Gradle / Ivy

There is a newer version: 4.8.4
Show newest version
package {{packageName}}.core.{{contractName}}

import org.web3j.openapi.core.CONTRACT_ADDRESS
import org.web3j.openapi.core.CONTRACT_ADDRESS_PATH
import org.web3j.openapi.core.ContractLifecycle
import {{packageName}}.core.{{contractName}}.model.{{#contractDetails}}{{capitalizedContractName}}{{/contractDetails}}DeployParameters
import org.web3j.protocol.core.methods.response.TransactionReceipt
import javax.annotation.processing.Generated
import io.swagger.v3.oas.annotations.Operation
import javax.ws.rs.Consumes
import javax.ws.rs.POST
import javax.ws.rs.Path
import javax.ws.rs.PathParam
import javax.ws.rs.Produces
import javax.ws.rs.core.MediaType

@Generated
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
{{#contractDetails}}
interface {{capitalizedContractName}}Lifecycle {

    @POST
    @Operation(
        tags = ["{{capitalizedContractName}} Methods"],
        summary = "Deploys the {{capitalizedContractName}} contract"
    )
    fun deploy{{deployParameters}}: TransactionReceipt
    
    @Path(CONTRACT_ADDRESS_PATH)
    @Operation(
        tags = ["{{capitalizedContractName}} Methods"],
        summary = "Loads the {{capitalizedContractName}} contract"
    )
    fun load(@PathParam(CONTRACT_ADDRESS) contractAddress: String): {{capitalizedContractName}}Resource
}
{{/contractDetails}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy