Solidity code for creating a new contract calling createRainfallPolicy:
event PolicyCreated(address _policy, string _insuredId);
function createRainfallPolicy(/*Params*/) public {
RainfallPolicy policy = new RainfallPolicy(/*Args*/);
emit PolicyCreated(address(policy), _insuredId);
}
.Net code for calling createRainfallPolicy:
var transactionInput = createPolicyFunction.CreateTransactionInput(account.Address, gas, null, null, params);
var transactionHash = await web3.Eth.TransactionManager.SendTransactionAsync(transactionInput);
It works as expected but I need to get the address of the created contract (RainfallPolicy address).