From 172b90dbf7d8fc7cc6a3ea85d44d5ad6c99a1e5f Mon Sep 17 00:00:00 2001 From: chyngyz Date: Tue, 14 Feb 2023 12:42:15 +0600 Subject: [PATCH] Remove parameter `nonce` from `L1FeeProvider.getL1Fee()' - hard-code it to 1 --- .../ethereumkit/core/rollup/L1FeeProvider.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ethereumkit/src/main/java/io/horizontalsystems/ethereumkit/core/rollup/L1FeeProvider.kt b/ethereumkit/src/main/java/io/horizontalsystems/ethereumkit/core/rollup/L1FeeProvider.kt index 53035c60..2df39703 100644 --- a/ethereumkit/src/main/java/io/horizontalsystems/ethereumkit/core/rollup/L1FeeProvider.kt +++ b/ethereumkit/src/main/java/io/horizontalsystems/ethereumkit/core/rollup/L1FeeProvider.kt @@ -20,12 +20,12 @@ class L1FeeProvider( override fun getArguments() = listOf(transaction) } - fun getL1Fee(gasPrice: GasPrice, gasLimit: Long, to: Address, value: BigInteger, data: ByteArray, nonce: Long?): Single { - val rawTransaction = RawTransaction(gasPrice, gasLimit, to, value, nonce ?: 1, data) + fun getL1Fee(gasPrice: GasPrice, gasLimit: Long, to: Address, value: BigInteger, data: ByteArray): Single { + val rawTransaction = RawTransaction(gasPrice, gasLimit, to, value, 1, data) val encoded = TransactionBuilder.encode(rawTransaction, null, evmKit.chain.id) - val data = L1FeeMethod(encoded).encodedABI() + val feeMethodABI = L1FeeMethod(encoded).encodedABI() - return evmKit.call(contractAddress, data) + return evmKit.call(contractAddress, feeMethodABI) .map { it.sliceArray(IntRange(0, 31)).toBigInteger() } }