|
@@ -84,18 +84,19 @@ public class ZkSyncCrossScript extends IScript {
|
|
|
ListUtil.of(new TypeReference<Bytes32>() {
|
|
|
}));
|
|
|
BigInteger nonce = Web3Util.getNonce(web3j, airdropWallet.getAddress());
|
|
|
- BigInteger gasPrice = web3j.ethGasPrice().send().getGasPrice();
|
|
|
+
|
|
|
String l2Encoder = FunctionEncoder.encode(requestL2Transaction);
|
|
|
|
|
|
BigDecimal value = Convert.toWei(amount.add(new BigDecimal(l2Gas.getValue())), Convert.Unit.ETHER);
|
|
|
Transaction callTransaction = Transaction.createFunctionCallTransaction(
|
|
|
airdropWallet.getAddress(),
|
|
|
nonce,
|
|
|
- gasPrice,
|
|
|
+ BigInteger.ZERO,
|
|
|
BigInteger.valueOf(0),
|
|
|
mailBox,
|
|
|
value.toBigInteger(),
|
|
|
l2Encoder);
|
|
|
+ BigInteger gasPrice = web3j.ethGasPrice().send().getGasPrice();
|
|
|
BigInteger gasLimit = Web3Util.getTransactionGasLimit(web3j, callTransaction);
|
|
|
gasLimit = BigDecimal.valueOf(1.3).multiply(new BigDecimal(gasLimit)).toBigInteger();
|
|
|
RawTransaction rawTransaction = RawTransaction.createTransaction(nonce,
|