Skip to content

Commit

Permalink
Remove parameter nonce from `L1FeeProvider.getL1Fee()'
Browse files Browse the repository at this point in the history
- hard-code it to 1
  • Loading branch information
omurovch committed Feb 20, 2023
1 parent 2e9dce9 commit 172b90d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<BigInteger> {
val rawTransaction = RawTransaction(gasPrice, gasLimit, to, value, nonce ?: 1, data)
fun getL1Fee(gasPrice: GasPrice, gasLimit: Long, to: Address, value: BigInteger, data: ByteArray): Single<BigInteger> {
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() }
}

Expand Down

0 comments on commit 172b90d

Please sign in to comment.