Skip to content

Conversation

@vladimirlogachev
Copy link
Contributor

@vladimirlogachev vladimirlogachev commented May 16, 2025

  • Refactor native token transfers to use deposited transactions instead of withdrawals
  • Add test for scale
  • Increase chain contract fee for local-network, because it tends to grow again and again

Copy link

@goodmai goodmai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@vladimirlogachev vladimirlogachev marked this pull request as ready for review June 10, 2025 13:54
@vladimirlogachev vladimirlogachev force-pushed the native-token-transfers-deposits-2 branch from 9e79ca8 to 621c6a1 Compare June 18, 2025 11:29
@vladimirlogachev vladimirlogachev force-pushed the native-token-transfers-deposits-2 branch from 59eb7d5 to 701551f Compare July 2, 2025 06:27

import com.wavesplatform.transaction.TxHelpers
import com.wavesplatform.state.IntegerDataEntry
import org.web3j.crypto.Credentials
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, fixed

val e2cWavesTxn = standardBridge.sendBridgeErc20(elSender, WWavesAddress, clRecipient.toAddress, wavesE2CAmount, nextNonce)

chainContract.waitForEpoch(waves1.api.height() + 1) // Bypass rollbacks
val e2cReceipts = List(e2cIssuedTxn, e2cIssuedTxn, e2cWavesTxn).map { txn =>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e2cIssuedTxn appointed twice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, fixed

@vladimirlogachev vladimirlogachev force-pushed the native-token-transfers-deposits-2 branch from 0a2b9fb to ab9939f Compare July 8, 2025 07:45
val (nativeTransfers, assetTransfers) = transfers.partitionMap {
case x: ContractTransfer.Native => x.asLeft
case x: ContractTransfer.Asset => x.asRight
val nativeTransfersViaWithdrawals = transfers.flatMap {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
val nativeTransfersViaWithdrawals = transfers.flatMap {
val nativeTransfersViaWithdrawals = transfers.collect {
case x: ContractTransfer.NativeViaWithdrawal => x
}

@phearnot phearnot merged commit c0c6dea into main Oct 21, 2025
4 checks passed
@phearnot phearnot deleted the native-token-transfers-deposits-2 branch October 21, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants