-
Notifications
You must be signed in to change notification settings - Fork 715
Closed
Labels
bugUnwanted or unintended property causing functional harmUnwanted or unintended property causing functional harmlockedtestnet
Description
Describe the bug
The following contract defines a fungible token. It was deployed and a transfer call failed because the user didn't own the asset. However, the transaction result is shown as (err u1) instead of (ok (err u1))
(define-constant owner 'ST3X2W2SH9XQZRHHYJ21KWGTT1N6WX3D48K1NSTPE)
(define-fungible-token connect-token)
(begin (ft-mint? connect-token u100000000 owner))
(define-public (transfer (recipient principal) (amount uint))
(ok (ft-transfer? connect-token amount tx-sender recipient)))
Steps To Reproduce
- setup mocknet and stacks-node-api
- deploy contract to mocknet
- send transfer tx with post condition
- use tx id to find tx on stacks-node-api
- see tx_result is equal to
(err u1)
Expected behavior
The tx_result should be (ok (err u1))
Example (25 Nov 2020)
If you think this is eligible for a bug bounty, please check the relevant boxes below:
Critical, Launch Blocking Bugs
Consensus critical bugs
- Can cause a chain split
- Can cause an invalid transaction to get mined
- Can cause an invalid block to get accepted
- Can cause a node to stall
State corruption
- Can modify a smart contract’s data maps and data vars without a `contract-call?
Stolen funds
- Any address losing STX without a corresponding transfer
- Modify token balances and NFT ownership in other contracts without a
contract-call?
Take control and/or bring network to a halt
- Take control and/or bring network to a halt
Major, Launch Blocking Bugs
Major bugs
- Performance or correctness bugs that don’t rise to P0 level
- Stress test or DoS attacks that slow things down enough
- Resource exhaustion
- Expected functionality doesn’t work in obvious ways (important to be super specific with this wording)
Minor, Non-launch blocking bugs
Minor bugs
- Bugs in non-critical software (CLI, UI, etc) that doesn’t impact critical functionality
Metadata
Metadata
Assignees
Labels
bugUnwanted or unintended property causing functional harmUnwanted or unintended property causing functional harmlockedtestnet