Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emit before transfer (#446) #482

Merged
merged 8 commits into from
Jul 12, 2024

Conversation

doerfli
Copy link
Contributor

@doerfli doerfli commented Jul 8, 2024

ERC20 transfers (direct)

  • Component.setWallet
  • Switch Component.setWallet to use TokenHandler

TokenHandler.safeTransferFrom()

  • not used by anyone

TokenHandler.transfer()

Note: Prefix X means trace to externally callable function not completed

  • Distribution.withdrawCommission via DistributionService.withdrawCommission
  • Pool.withdrawBundleFees via BundleService.withdrawBundleFees
  • BasicPool.unstake via Pool._unstake via PoolService.unstake
  • Pool._unstake via PoolService.unstake
  • Pool._createBundle via PoolService.createBundle via _collectStakingAmount
  • BasicPool.stake via Pool._stake PoolService.stake via _collectStakingAmount
  • Pool._stake via PoolService.stake via _collectStakingAmount
  • Product._processPayout via ClaimService.processPayout via _transferPayoutAmount
  • Product._collateralize via PolicyService.collateralize via _processSaleAndTransferFunds
  • Product._collectPremium via PolicyService.collectPremium via _processSaleAndTransferFunds
  • InstanceLinkedComponent.withdrawFees via InstanceLinkedComponent._withdrawFees via ComponentService.withdrawFees
  • InstanceLinkedComponent._withdrawFees via ComponentService.withdrawFees
  • StakingService.create via Staking.collectDipAmount
  • StakingService.stake via Staking.collectDipAmount
  • Instance.refillStakingRewardReserves via StakingService.refillInstanceRewardReserves via StakingService._refillRewardReserves via Staking.collectDipAmount
  • StakingService.refillRewardReservesBySender via StakingService._refillRewardReserves via Staking.collectDipAmount
  • Instance.withdrawStakingRewardReserves via InstanceService.withdrawStakingRewardReserves via StakingService.withdrawInstanceRewardReserves via Staking.transferDipAmount
  • StakingService.claimRewards via Staking.transferDipAmount
  • StakingService.unstake via Staking.transferDipAmount

@doerfli doerfli linked an issue Jul 8, 2024 that may be closed by this pull request
4 tasks
@doerfli doerfli force-pushed the feature/fix-transfer-ordering branch from bf15367 to 201178d Compare July 8, 2024 13:25
Copy link
Contributor

github-actions bot commented Jul 9, 2024

Todo Commenter

contracts/distribution/DistributionService.sol
TODO:
contracts/pool/BundleService.sol
TODO:
contracts/pool/PoolService.sol
TODO:
contracts/product/ClaimService.sol
TODO:
contracts/product/PolicyService.sol
TODO:
contracts/shared/ComponentService.sol
TODO:

@doerfli Please take a look 👀

@matthiaszimmermann matthiaszimmermann merged commit 1071af4 into develop Jul 12, 2024
12 checks passed
@matthiaszimmermann matthiaszimmermann deleted the feature/fix-transfer-ordering branch July 12, 2024 10:23
@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Codebase: Ensure that Token Transfers are always the last actions in any transaction
2 participants