Search in sources :

Example 1 with StaticGasProvider

use of org.web3j.tx.gas.StaticGasProvider in project winery by eclipse.

the class ContractDeployer method deployAuthorization.

/**
 * Deploys the authorization smart contract.
 *
 * @return Address of the smart Contract that was deployed
 */
public String deployAuthorization() throws Exception {
    final StaticGasProvider provider = new DefaultGasProvider();
    Authorization authorization = Authorization.deploy(web3j, credentials, provider).send();
    LOGGER.debug("Provenance SC Address: " + authorization.getContractAddress());
    return authorization.getContractAddress();
}
Also used : StaticGasProvider(org.web3j.tx.gas.StaticGasProvider) Authorization(org.eclipse.winery.accountability.blockchain.ethereum.generated.Authorization) DefaultGasProvider(org.web3j.tx.gas.DefaultGasProvider)

Example 2 with StaticGasProvider

use of org.web3j.tx.gas.StaticGasProvider in project winery by eclipse.

the class ContractDeployer method deployProvenance.

/**
 * Deploys the provenance smart contract
 *
 * @return Address of the smart Contract that was deployed
 */
public String deployProvenance() throws Exception {
    final StaticGasProvider provider = new DefaultGasProvider();
    Provenance provenance = Provenance.deploy(web3j, credentials, provider).send();
    LOGGER.debug("Provenance SC Address: " + provenance.getContractAddress());
    return provenance.getContractAddress();
}
Also used : StaticGasProvider(org.web3j.tx.gas.StaticGasProvider) Provenance(org.eclipse.winery.accountability.blockchain.ethereum.generated.Provenance) DefaultGasProvider(org.web3j.tx.gas.DefaultGasProvider)

Aggregations

DefaultGasProvider (org.web3j.tx.gas.DefaultGasProvider)2 StaticGasProvider (org.web3j.tx.gas.StaticGasProvider)2 Authorization (org.eclipse.winery.accountability.blockchain.ethereum.generated.Authorization)1 Provenance (org.eclipse.winery.accountability.blockchain.ethereum.generated.Provenance)1