Updated on 2026-08-14
This commit is contained in:
parent
30b52bc194
commit
fe21d8801c
7 changed files with 25 additions and 8 deletions
|
|
@ -56,6 +56,7 @@ data class GaslessTransactionData(
|
|||
* @property coinPriceInToken price of native coin in fee token units
|
||||
* @property feeTransferGasLimit gas limit for fee token transfer
|
||||
* @property baseGas base gas cost (currently constant BASE_GAS, may vary in future)
|
||||
* @property feeReceiver address receiving the fee payment
|
||||
*/
|
||||
data class Fee(
|
||||
val feeToken: String,
|
||||
|
|
@ -63,5 +64,6 @@ data class GaslessTransactionData(
|
|||
val coinPriceInToken: BigInteger,
|
||||
val feeTransferGasLimit: BigInteger,
|
||||
val baseGas: BigInteger,
|
||||
val feeReceiver: String,
|
||||
)
|
||||
}
|
||||
|
|
@ -241,7 +241,7 @@ class CreateAndSendGaslessTransactionUseCase(
|
|||
}
|
||||
}
|
||||
|
||||
private fun createGaslessTransactionData(
|
||||
private suspend fun createGaslessTransactionData(
|
||||
transactionData: TransactionData.Uncompiled,
|
||||
txFee: TransactionFeeExtended,
|
||||
tokenFeeStatus: CryptoCurrencyStatus,
|
||||
|
|
@ -272,7 +272,7 @@ class CreateAndSendGaslessTransactionUseCase(
|
|||
)
|
||||
}
|
||||
|
||||
private fun buildFee(
|
||||
private suspend fun buildFee(
|
||||
txFee: TransactionFeeExtended,
|
||||
tokenFeeStatus: CryptoCurrencyStatus,
|
||||
): GaslessTransactionData.Fee {
|
||||
|
|
@ -288,6 +288,7 @@ class CreateAndSendGaslessTransactionUseCase(
|
|||
coinPriceInToken = feeInTokenCurrency.coinPriceInToken,
|
||||
feeTransferGasLimit = feeInTokenCurrency.feeTransferGasLimit,
|
||||
baseGas = feeInTokenCurrency.baseGas,
|
||||
feeReceiver = gaslessTransactionRepository.getTokenFeeReceiverAddress(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ object Eip712TypedDataBuilder {
|
|||
put(typeProperty("coinPriceInToken", "uint256"))
|
||||
put(typeProperty("feeTransferGasLimit", "uint256"))
|
||||
put(typeProperty("baseGas", "uint256"))
|
||||
put(typeProperty("feeReceiver", "address"))
|
||||
})
|
||||
put("GaslessTransaction", JSONArray().apply {
|
||||
put(typeProperty("transaction", "Transaction"))
|
||||
|
|
@ -117,6 +118,7 @@ object Eip712TypedDataBuilder {
|
|||
put("coinPriceInToken", gaslessTransaction.fee.coinPriceInToken.toString())
|
||||
put("feeTransferGasLimit", gaslessTransaction.fee.feeTransferGasLimit.toString())
|
||||
put("baseGas", gaslessTransaction.fee.baseGas.toString())
|
||||
put("feeReceiver", gaslessTransaction.fee.feeReceiver)
|
||||
})
|
||||
put("nonce", gaslessTransaction.nonce.toString())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue