@Test public void etcChainIdTest() { Transaction tx = new Transaction(Hex.decode("f871830617428504a817c80083015f90940123286bd94beecd40905321f5c3202c7628d685880ecab7b2bae2c27080819ea021355678b1aa704f6ad4706fb8647f5125beadd1d84c6f9cf37dda1b62f24b1aa06b4a64fd29bb6e54a2c5107e8be42ac039a8ffb631e16e7bcbd15cdfc0015ee2")); Integer chainId = tx.getChainId(); assertEquals(61, chainId.intValue()); }
public Integer getChainId() { rlpParse(); return chainId == null ? null : (int) chainId; }
Transaction { public Integer getChainId() { rlpParse(); return chainId == null ? null : (int) chainId; } }
Transaction { public Integer getChainId() { rlpParse(); return chainId == null ? null : (int) chainId; } Transaction(byte[] rawData);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data,
                       Integer chainId);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data,
                       byte[] r, byte[] s, byte v, Integer chainId);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data,
                       byte[] r, byte[] s, byte v); }
Transaction { public Integer getChainId() { rlpParse(); return chainId == null ? null : (int) chainId; } Transaction(byte[] rawData);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data,
                       Integer chainId);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data,
                       byte[] r, byte[] s, byte v, Integer chainId);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data,
                       byte[] r, byte[] s, byte v); long transactionCost(BlockchainNetConfig config, Block block); synchronized void verify(); synchronized void rlpParse(); boolean isParsed(); byte[] getHash(); byte[] getRawHash(); byte[] getNonce(); boolean isValueTx(); byte[] getValue(); byte[] getReceiveAddress(); byte[] getGasPrice(); byte[] getGasLimit(); long nonZeroDataBytes(); long zeroDataBytes(); byte[] getData(); ECDSASignature getSignature(); byte[] getContractAddress(); boolean isContractCreation(); ECKey getKey(); synchronized byte[] getSender(); Integer getChainId(); void sign(byte[] privKeyBytes); void sign(ECKey key); @Override String toString(); String toString(int maxDataSize); byte[] getEncodedRaw(); synchronized byte[] getEncoded(); @Override int hashCode(); @Override boolean equals(Object obj); static Transaction createDefault(String to, BigInteger amount, BigInteger nonce); static Transaction createDefault(String to, BigInteger amount, BigInteger nonce, Integer chainId); static Transaction create(String to, BigInteger amount, BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit); static Transaction create(String to, BigInteger amount, BigInteger nonce, BigInteger gasPrice,
                                     BigInteger gasLimit, Integer chainId); }
Transaction { public Integer getChainId() { rlpParse(); return chainId == null ? null : (int) chainId; } Transaction(byte[] rawData);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data,
                       Integer chainId);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data,
                       byte[] r, byte[] s, byte v, Integer chainId);  Transaction(byte[] nonce, byte[] gasPrice, byte[] gasLimit, byte[] receiveAddress, byte[] value, byte[] data,
                       byte[] r, byte[] s, byte v); long transactionCost(BlockchainNetConfig config, Block block); synchronized void verify(); synchronized void rlpParse(); boolean isParsed(); byte[] getHash(); byte[] getRawHash(); byte[] getNonce(); boolean isValueTx(); byte[] getValue(); byte[] getReceiveAddress(); byte[] getGasPrice(); byte[] getGasLimit(); long nonZeroDataBytes(); long zeroDataBytes(); byte[] getData(); ECDSASignature getSignature(); byte[] getContractAddress(); boolean isContractCreation(); ECKey getKey(); synchronized byte[] getSender(); Integer getChainId(); void sign(byte[] privKeyBytes); void sign(ECKey key); @Override String toString(); String toString(int maxDataSize); byte[] getEncodedRaw(); synchronized byte[] getEncoded(); @Override int hashCode(); @Override boolean equals(Object obj); static Transaction createDefault(String to, BigInteger amount, BigInteger nonce); static Transaction createDefault(String to, BigInteger amount, BigInteger nonce, Integer chainId); static Transaction create(String to, BigInteger amount, BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit); static Transaction create(String to, BigInteger amount, BigInteger nonce, BigInteger gasPrice,
                                     BigInteger gasLimit, Integer chainId); static final int HASH_LENGTH; static final int ADDRESS_LENGTH; static final MemSizeEstimator<Transaction> MemEstimator; }