1

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).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.