@Test public void serializeWithoutAttributesAndWitnesses() { List<Signer> signers = new ArrayList<>(); signers.add(Signer.calledByEntry(account1)); List<Witness> witnesses = new ArrayList<>(); witnesses.add(new Witness(new byte[]{0x00}, new byte[]{0x00})); Transaction tx = new Transaction(neow, (byte) 0, 0x01020304L, 0x01020304L, signers, BigInteger.TEN.pow(8).longValue(), 1L, new ArrayList<>(), new byte[]{(byte) OpCode.PUSH1.getCode()}, new ArrayList<>()); byte[] actual = tx.toArray(); byte[] expected = Numeric.hexStringToByteArray("" + "00" + "04030201" + "00e1f50500000000" + "0100000000000000" + "04030201" + "01" + "23ba2703c53263e8d6e522dc32203339dcd8eee9" + "01" + "00" + "01" + OpCode.PUSH1.toString() + "00"); assertArrayEquals(expected, actual); }
@Override public byte[] toArray() { return super.toArray(); }
Transaction extends NeoSerializable { @Override public byte[] toArray() { return super.toArray(); } }
Transaction extends NeoSerializable { @Override public byte[] toArray() { return super.toArray(); } Transaction();  Transaction(Neow3j neow, byte version, long nonce, long validUntilBlock, List<Signer> signers,
            long systemFee, long networkFee, List<TransactionAttribute> attributes, byte[] script,
            List<Witness> witnesses); }
Transaction extends NeoSerializable { @Override public byte[] toArray() { return super.toArray(); } Transaction();  Transaction(Neow3j neow, byte version, long nonce, long validUntilBlock, List<Signer> signers,
            long systemFee, long networkFee, List<TransactionAttribute> attributes, byte[] script,
            List<Witness> witnesses); byte getVersion(); long getNonce(); long getValidUntilBlock(); List<Signer> getSigners(); ScriptHash getSender(); long getSystemFee(); long getNetworkFee(); List<TransactionAttribute> getAttributes(); byte[] getScript(); List<Witness> getWitnesses(); void addWitness(Witness witness); String getTxId(); NeoSendRawTransaction send(); @Override int getSize(); @Override void deserialize(BinaryReader reader); @Override void serialize(BinaryWriter writer); byte[] toArrayWithoutWitnesses(); byte[] getHashData(); @Override byte[] toArray(); }
Transaction extends NeoSerializable { @Override public byte[] toArray() { return super.toArray(); } Transaction();  Transaction(Neow3j neow, byte version, long nonce, long validUntilBlock, List<Signer> signers,
            long systemFee, long networkFee, List<TransactionAttribute> attributes, byte[] script,
            List<Witness> witnesses); byte getVersion(); long getNonce(); long getValidUntilBlock(); List<Signer> getSigners(); ScriptHash getSender(); long getSystemFee(); long getNetworkFee(); List<TransactionAttribute> getAttributes(); byte[] getScript(); List<Witness> getWitnesses(); void addWitness(Witness witness); String getTxId(); NeoSendRawTransaction send(); @Override int getSize(); @Override void deserialize(BinaryReader reader); @Override void serialize(BinaryWriter writer); byte[] toArrayWithoutWitnesses(); byte[] getHashData(); @Override byte[] toArray(); static final int HEADER_SIZE; }