Skip to content

mainnet/ft-burn? fails without clear reason #3460

Closed
@perplexedpigmy

Description

@perplexedpigmy

We had ft-burn? failing with u1 error
As per the documentation
"If a non-positive amount is provided to burn, this function returns (err 1). Otherwise, on successfuly burn, it returns (ok true)."

But neither the amount (3,000,000, 000) was negative nor would the action result in the principal having negative number of tokens and a consecutive identical ft-burn? went through without any hiccups

It happened only once, so I am unclear whether it is reproducible or how.

Yet, I would expect, clarity's functions to be predictable, given the same preconditions, yield the same results.

Relevant excerpt of the function calling ft-burn? constants displayed as value

((define-public (burn-tokens (burn-amount uint) (burn-from principal) )
  (begin
    (asserts! (has-role BURNER_ROLE contract-caller) (err u403))
    (print { action: "burn-tokens", burn-amount: burn-amount, burn-from : burn-from  })
    (ft-burn? wrapped-bitcoin burn-amount burn-from)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions