@Test public void testRedeployTx() throws Exception { final ContractTemplate contractTemplate = new ContractTemplate(contextStorage); final Requester mockRequester = mock(Requester.class); final ContractTxHash expected = ContractTxHash.of(BytesValue.EMPTY); when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any())) .thenReturn(expected); contractTemplate.requester = mockRequester; assertEquals(expected, contractTemplate .redeploy(anySigner, anyContractAddress, anyDefinition, anyNonce, anyFee)); assertEquals(expected, contractTemplate .redeployTx(anySigner, anyContractAddress, anyDefinition, anyNonce, anyFee)); }
@Override public TxHash redeployTx(final Signer signer, final ContractAddress existingContract, final ContractDefinition contractDefinition, final long nonce, final Fee fee) { return request(contractMethods.getRedeployTx(), Arrays.asList(signer, existingContract, contractDefinition, nonce, fee)); }
ContractTemplate extends AbstractTemplate implements ContractOperation { @Override public TxHash redeployTx(final Signer signer, final ContractAddress existingContract, final ContractDefinition contractDefinition, final long nonce, final Fee fee) { return request(contractMethods.getRedeployTx(), Arrays.asList(signer, existingContract, contractDefinition, nonce, fee)); } }
ContractTemplate extends AbstractTemplate implements ContractOperation { @Override public TxHash redeployTx(final Signer signer, final ContractAddress existingContract, final ContractDefinition contractDefinition, final long nonce, final Fee fee) { return request(contractMethods.getRedeployTx(), Arrays.asList(signer, existingContract, contractDefinition, nonce, fee)); } ContractTemplate(final ContextStorage<Context> contextStorage); }
ContractTemplate extends AbstractTemplate implements ContractOperation { @Override public TxHash redeployTx(final Signer signer, final ContractAddress existingContract, final ContractDefinition contractDefinition, final long nonce, final Fee fee) { return request(contractMethods.getRedeployTx(), Arrays.asList(signer, existingContract, contractDefinition, nonce, fee)); } ContractTemplate(final ContextStorage<Context> contextStorage); @Override ContractTxReceipt getReceipt(final ContractTxHash contractTxHash); @Override ContractTxReceipt getContractTxReceipt(final TxHash txHash); @Override ContractTxHash deploy(final Account creator, final ContractDefinition contractDefinition,
      final long nonce); @Override ContractTxHash deploy(final Account creator, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override ContractTxHash deploy(final Signer signer, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override TxHash deployTx(final Signer signer, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override ContractTxHash redeploy(final Signer signer, final ContractAddress existingContract,
      final ContractDefinition contractDefinition, final long nonce, final Fee fee); @Override TxHash redeployTx(final Signer signer, final ContractAddress existingContract,
      final ContractDefinition contractDefinition, final long nonce, final Fee fee); @Override ContractInterface getContractInterface(final ContractAddress contractAddress); @Override ContractTxHash execute(final Account executor, final ContractInvocation contractInvocation,
      final long nonce); @Override ContractTxHash execute(final Account executor, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override ContractTxHash execute(final Signer signer, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override TxHash executeTx(final Signer signer, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override ContractResult query(final ContractInvocation contractInvocation); @Override List<Event> listEvents(final EventFilter filter); @Override Subscription<Event> subscribeEvent(final EventFilter filter,
      final StreamObserver<Event> observer); }
ContractTemplate extends AbstractTemplate implements ContractOperation { @Override public TxHash redeployTx(final Signer signer, final ContractAddress existingContract, final ContractDefinition contractDefinition, final long nonce, final Fee fee) { return request(contractMethods.getRedeployTx(), Arrays.asList(signer, existingContract, contractDefinition, nonce, fee)); } ContractTemplate(final ContextStorage<Context> contextStorage); @Override ContractTxReceipt getReceipt(final ContractTxHash contractTxHash); @Override ContractTxReceipt getContractTxReceipt(final TxHash txHash); @Override ContractTxHash deploy(final Account creator, final ContractDefinition contractDefinition,
      final long nonce); @Override ContractTxHash deploy(final Account creator, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override ContractTxHash deploy(final Signer signer, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override TxHash deployTx(final Signer signer, final ContractDefinition contractDefinition,
      final long nonce, final Fee fee); @Override ContractTxHash redeploy(final Signer signer, final ContractAddress existingContract,
      final ContractDefinition contractDefinition, final long nonce, final Fee fee); @Override TxHash redeployTx(final Signer signer, final ContractAddress existingContract,
      final ContractDefinition contractDefinition, final long nonce, final Fee fee); @Override ContractInterface getContractInterface(final ContractAddress contractAddress); @Override ContractTxHash execute(final Account executor, final ContractInvocation contractInvocation,
      final long nonce); @Override ContractTxHash execute(final Account executor, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override ContractTxHash execute(final Signer signer, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override TxHash executeTx(final Signer signer, final ContractInvocation contractInvocation,
      final long nonce, final Fee fee); @Override ContractResult query(final ContractInvocation contractInvocation); @Override List<Event> listEvents(final EventFilter filter); @Override Subscription<Event> subscribeEvent(final EventFilter filter,
      final StreamObserver<Event> observer);  }