public void ShouldBeAbleToConfirmUpdate() { string contractAddress = "0xa454963c7a6dcbdcd0d3fb281f4e67262fb71586"; string rpc = Environment.GetEnvironmentVariable("TEST_RPC") ?? "http://localhost:8545"; string validatorAddress = "0xc3681dfe99730eb45154208cba7b0df7e705f305"; string fileToPersistBlockNum = Path.GetTempFileName(); ResetToSnapshot(rpc); IContractWrapper cw = new ContractWrapper(contractAddress, rpc, validatorAddress, new MockLogger(), "test", _keyjson, fileToPersistBlockNum); cw.ConfirmUpdate().Wait(); }
public void ShouldThrowOnWrongContractDuringConfirmUpdate() { string contractAddress = "0xa454963c7a6dcbdcd0d3fb281f4e67262fb71586"; string rpc = Environment.GetEnvironmentVariable("TEST_RPC") ?? "http://localhost:8545"; string validatorAddress = "0xc3681dfe99730eb45154208cba7b0df7e705f305"; string fileToPersistBlockNum = Path.GetTempFileName(); ResetToSnapshot(rpc); IContractWrapper cw = new ContractWrapper(contractAddress, rpc, validatorAddress, new MockLogger(), "test", _keyjson, fileToPersistBlockNum); Action confirmUpdateAction = () => { cw.ConfirmUpdate().Wait(); }; confirmUpdateAction.Should() .Throw <ContractException>() .WithMessage("Unable to confirm update"); }