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() } }