server.src.ContractsApiImpl.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of web3j-openapi-codegen Show documentation
Show all versions of web3j-openapi-codegen Show documentation
web3j-openapi project code generators
package {{packageName}}.server
import {{packageName}}.core.{{projectName}}Api
import org.web3j.openapi.server.config.ContractAddresses
import org.glassfish.jersey.server.ExtendedUriInfo
import org.web3j.crypto.Credentials
import org.web3j.protocol.Web3j
import org.web3j.tx.RawTransactionManager
import org.web3j.tx.gas.ContractGasProvider
import javax.annotation.Generated
import javax.inject.Inject
import javax.ws.rs.core.Context
@Generated
class {{projectName}}ApiImpl @Inject constructor(
web3j: Web3j,
credentials: Credentials,
gasProvider: ContractGasProvider,
contractAddresses: ContractAddresses,
@Context uriInfo: ExtendedUriInfo
) : {{projectName}}Api {
override val contracts = {{projectName}}ResourceImpl(
web3j, RawTransactionManager(web3j, credentials), gasProvider, contractAddresses, uriInfo
)
}