NeoURI { public TransactionBuilder buildTransfer() throws IOException { if (neow3j == null) { throw new IllegalStateException("Neow3j instance is not set."); } if (toAddress == null) { throw new IllegalStateException("Recipient address is not set."); } if (wallet == null) { throw new IllegalStateException("Wallet is not set."); } if (amount == null) { throw new IllegalStateException("Amount is not set."); } BigInteger fractions; BigDecimal factor; if (isNeoToken(asset)) { factor = BigDecimal.TEN.pow(NeoToken.DECIMALS); fractions = amount.multiply(factor).toBigInteger(); } else if (isGasToken(asset)) { factor = BigDecimal.TEN.pow(GasToken.DECIMALS); fractions = amount.multiply(factor).toBigInteger(); } else { fractions = computeFractions(neow3j, asset); } return new SmartContract(asset, neow3j) .invokeFunction(TRANSFER_FUNCTION, ContractParameter.hash160(wallet.getDefaultAccount().getScriptHash()), ContractParameter.hash160(toAddress), ContractParameter.integer(fractions)) .wallet(wallet); } NeoURI();  NeoURI(Neow3j neow3j); static NeoURI fromURI(String uriString); TransactionBuilder buildTransfer(); NeoURI toAddress(String address); NeoURI toAddress(ScriptHash address); NeoURI asset(byte[] asset); NeoURI asset(ScriptHash asset); NeoURI asset(String asset); NeoURI amount(String amount); NeoURI amount(Integer amount); NeoURI amount(BigInteger amount); NeoURI amount(BigDecimal amount); NeoURI neow3j(Neow3j neow3j); NeoURI wallet(Wallet wallet); NeoURI buildURI(); URI getURI(); String getURIAsString(); String getToAddress(); ScriptHash getAddressAsScriptHash(); ScriptHash getAsset(); String getAssetAsString(); String getAssetAsAddress(); BigDecimal getAmount(); String getAmountAsString();  }
@Test public void buildTransfer() throws IOException { assertThat(new NeoURI() .neow3j(neow3j) .asset(NeoToken.SCRIPT_HASH) .wallet(WALLET) .toAddress(ADDRESS) .amount(AMOUNT) .buildTransfer(), is(instanceOf(TransactionBuilder.class))); }