November 2018
Intermediate to advanced
528 pages
13h 21m
English
As the wallet credentials are defined and the web3 is initialized, we can construct and deploy our Cfutures contract using the deploy method:
CFutures CFuture_ = CFutures.deploy(web3j, credentials, CUSTOM_GAS_PRICE, GAS_LIMIT, assetID, Quantity, price, buyer, seller, date).send();
The first four arguments are needed to construct the deployment transaction, while the rest are the arguments needed by the contract's constructor.
Among these four parameters, we need to define the gas limit and the gas price. In this example, I have defined them as global variables, as follows:
private static final BigInteger GAS_LIMIT = BigInteger.valueOf(4_700_000);private static final BigInteger CUSTOM_GAS_PRICE = Convert.toWei("140", ...Read now
Unlock full access