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

coins and coin mismatch in code example #849

Open
T1MOH593 opened this issue Mar 10, 2025 · 1 comment
Open

coins and coin mismatch in code example #849

T1MOH593 opened this issue Mar 10, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation move-and-smart-contracts All content under https://aptos.dev/en/build/smart-contracts

Comments

@T1MOH593
Copy link

Url

https://aptos.dev/en/build/smart-contracts/move-security-guidelines#example-insecure-code-2

Describe the content issue

This code block:

  public fun repay_flash_loan<T>(rec: Receipt, coins: Coin<T>) {
    let Receipt{ amount } = rec;
    assert!(coin::value<T>(&coin) >= rec.amount, 0);
    deposit(coin);
  }

Section

move-and-smart-contracts

@T1MOH593 T1MOH593 added the documentation Improvements or additions to documentation label Mar 10, 2025
@github-actions github-actions bot added the move-and-smart-contracts All content under https://aptos.dev/en/build/smart-contracts label Mar 10, 2025
Copy link

@aptos-labs/move-eng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation move-and-smart-contracts All content under https://aptos.dev/en/build/smart-contracts
Projects
None yet
Development

No branches or pull requests

1 participant