@Test public void testEip155Transaction() { ECKey ecKey = ECKey.fromPrivate(NumericUtil.hexToBytes("0x4646464646464646464646464646464646464646464646464646464646464646")); assertThat(createEip155RawTransaction().signTransaction(1, ecKey.getPrivKeyBytes()), is( "f86c098504a817c800825208943535353535353535353535353535353535353535880" + "de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d" + "3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf55" + "5c9f3dc64214b297fb1966a3b6d83")); }
@Override public TxSignResult signTransaction(String chainID, String password, Wallet wallet) { String signedTx = signTransaction(Integer.parseInt(chainID), wallet.decryptMainKey(password)); String txHash = this.calcTxHash(signedTx); return new TxSignResult(signedTx, txHash); }
EthereumTransaction implements TransactionSigner { @Override public TxSignResult signTransaction(String chainID, String password, Wallet wallet) { String signedTx = signTransaction(Integer.parseInt(chainID), wallet.decryptMainKey(password)); String txHash = this.calcTxHash(signedTx); return new TxSignResult(signedTx, txHash); } }
EthereumTransaction implements TransactionSigner { @Override public TxSignResult signTransaction(String chainID, String password, Wallet wallet) { String signedTx = signTransaction(Integer.parseInt(chainID), wallet.decryptMainKey(password)); String txHash = this.calcTxHash(signedTx); return new TxSignResult(signedTx, txHash); } EthereumTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to,
                             BigInteger value, String data); }
EthereumTransaction implements TransactionSigner { @Override public TxSignResult signTransaction(String chainID, String password, Wallet wallet) { String signedTx = signTransaction(Integer.parseInt(chainID), wallet.decryptMainKey(password)); String txHash = this.calcTxHash(signedTx); return new TxSignResult(signedTx, txHash); } EthereumTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to,
                             BigInteger value, String data); BigInteger getNonce(); BigInteger getGasPrice(); BigInteger getGasLimit(); String getTo(); BigInteger getValue(); String getData(); @Override TxSignResult signTransaction(String chainID, String password, Wallet wallet); }
EthereumTransaction implements TransactionSigner { @Override public TxSignResult signTransaction(String chainID, String password, Wallet wallet) { String signedTx = signTransaction(Integer.parseInt(chainID), wallet.decryptMainKey(password)); String txHash = this.calcTxHash(signedTx); return new TxSignResult(signedTx, txHash); } EthereumTransaction(BigInteger nonce, BigInteger gasPrice, BigInteger gasLimit, String to,
                             BigInteger value, String data); BigInteger getNonce(); BigInteger getGasPrice(); BigInteger getGasLimit(); String getTo(); BigInteger getValue(); String getData(); @Override TxSignResult signTransaction(String chainID, String password, Wallet wallet);  }