Search in sources :

Example 1 with Authorization

use of org.eclipse.winery.accountability.blockchain.ethereum.generated.Authorization 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 Authorization

use of org.eclipse.winery.accountability.blockchain.ethereum.generated.Authorization in project winery by eclipse.

the class SmartContractProvider method buildAuthorizationSmartContract.

public static Authorization buildAuthorizationSmartContract(final Web3j web3j, final Credentials credentials, String smartContractAddress) throws BlockchainException {
    final Authorization contract = Authorization.load(smartContractAddress, web3j, credentials, DefaultGasProvider.GAS_PRICE, DefaultGasProvider.GAS_LIMIT);
    validateSmartContract(contract, smartContractAddress);
    return contract;
}
Also used : Authorization(org.eclipse.winery.accountability.blockchain.ethereum.generated.Authorization)

Aggregations

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